From af8e5e07c2d57e31c8f10c234851a80153fae002 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Fri, 8 Jun 2018 20:08:12 -0500 Subject: [PATCH] yamux: disable yamux keep alive in server channel yamux client runs in the proxy side, sometimes the client is handling other requests and it's not able to response to the ping sent by the server and the communication is closed. To avoid IO timeouts in the communication between agent and proxy, keep alive should be disabled. Depends-on: github.com/kata-containers/proxy#91 fixes kata-containers/proxy#70 fixes #231 Signed-off-by: Julio Montes --- channel.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/channel.go b/channel.go index 624c81a08e..3eb2846d42 100644 --- a/channel.go +++ b/channel.go @@ -162,7 +162,12 @@ func (yw yamuxWriter) Write(bytes []byte) (int, error) { func (c *serialChannel) listen() (net.Listener, error) { config := yamux.DefaultConfig() - + // yamux client runs on the proxy side, sometimes the client is + // handling other requests and it's not able to response to the + // ping sent by the server and the communication is closed. To + // avoid any IO timeouts in the communication between agent and + // proxy, keep alive should be disabled. + config.EnableKeepAlive = false config.LogOutput = yamuxWriter{} // Initialize Yamux server.