Skip to content

Commit

Permalink
agent: disable yamux keep alive
Browse files Browse the repository at this point in the history
We don't know how much time a sandbox can be paused,
hence connection write timeout should be disabled to
don't close the connection while the sandbox is paused.

The same issue has been fixed in kata-proxy, for katabuiltin proxy,
it also needs this fix.

fixes kata-containers#294

Signed-off-by: fupan <[email protected]>
  • Loading branch information
lifupan committed Jul 6, 2018
1 parent b161535 commit cf8d3c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion protocols/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ func agentDialer(addr *url.URL, enableYamux bool) dialer {
}()

var session *yamux.Session
session, err = yamux.Client(conn, nil)
sessionConfig := yamux.DefaultConfig()
// Disable keepAlive since we don't know how much time a container can be paused
sessionConfig.EnableKeepAlive = false
session, err = yamux.Client(conn, sessionConfig)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cf8d3c8

Please sign in to comment.