Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #231

Signed-off-by: Julio Montes <[email protected]>
Julio Montes committed Jun 18, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b47b313 commit 83d7906
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion channel.go
Original file line number Diff line number Diff line change
@@ -144,8 +144,14 @@ func (c *serialChannel) wait() error {
}

func (c *serialChannel) listen() (net.Listener, error) {
config := yamux.DefaultConfig()
// 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.
config.EnableKeepAlive = false

// Initialize Yamux server.
session, err := yamux.Server(c.serialConn, nil)
session, err := yamux.Server(c.serialConn, config)
if err != nil {
return nil, err
}

0 comments on commit 83d7906

Please sign in to comment.