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

yamux: disable yamux keep alive in server channel #263

Merged
merged 1 commit into from
Jul 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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