Skip to content

Commit

Permalink
yamux: disable yamux keep alive in server channel
Browse files Browse the repository at this point in the history
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 kata-containers#231

Signed-off-by: Julio Montes <julio.montes@intel.com>
  • Loading branch information
Julio Montes authored and jshachm committed Nov 22, 2018
1 parent 0b30aaa commit af8e5e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion channel.go
Expand Up @@ -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.
Expand Down

0 comments on commit af8e5e0

Please sign in to comment.