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.

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 Sebastien Boeuf committed Jul 18, 2018
1 parent 17b44df commit d567b45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion channel.go
Original file line number Diff line number Diff line change
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 d567b45

Please sign in to comment.