diff --git a/protocols/client/client.go b/protocols/client/client.go index 7bd1843d0c..df92d8e510 100644 --- a/protocols/client/client.go +++ b/protocols/client/client.go @@ -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 }