How to keep socat alive using keepalive option

Solution 1:

From the socat manpage for -t<timeout>:

When one channel has reached EOF, the write part of the other channel is shut down.

Try adding the ignoreeof option.