From 2bda4a8ef8cbf91e854489a01f98983dc6ecd4a3 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 5 Apr 2017 15:54:58 -0700 Subject: [PATCH] tun2: be more aggressive about ping timeouts in smux --- lib/tun2/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tun2/server.go b/lib/tun2/server.go index a43ca63..f8f8cae 100644 --- a/lib/tun2/server.go +++ b/lib/tun2/server.go @@ -79,6 +79,9 @@ func NewServer(cfg *ServerConfig) (*Server, error) { cfg.SmuxConf = smux.DefaultConfig() } + cfg.SmuxConf.KeepAliveInterval = time.Second + cfg.SmuxConf.KeepAliveTimeout = 15 * time.Second + server := &Server{ cfg: cfg,