Setup TCP keep-alive on hijacked HTTP(S) client <--> daemon sessions Fixes #10387
Setup TCP keep-alive on hijacked HTTP(S) client <--> daemon sessions
Fixes #10387

Without TCP keep-alive set on socket connections to the daemon, any
long-running container with std{out,err,in} attached that doesn't
read/write for a minute or longer will end in ECONNTIMEDOUT (depending
on network settings/OS defaults, etc.), leaving the docker client side
believing it is still waiting on data with no actual underlying socket
connection.

This patch turns on TCP keep-alive for the underlying TCP connection
for both TLS and standard HTTP hijacked daemon connections from the
docker client, with a keep-alive timeout of 30 seconds.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>

ClusterHQ/docker-plugins,josemonsalve2/docker,carlye566/docker_eric,AdamOssenford/docker-pi,josemonsalve2/docker,seanmcdaniel/docker,AdamOssenford/docker-pi,AdamOssenford/docker-pi,carlye566/docker_eric,ClusterHQ/docker-plugins,seanmcdaniel/docker,ClusterHQ/docker-plugins,carlye566/docker_eric,seanmcdaniel/docker,josemonsalve2/docker