Merge branch 'master' into dev

This commit is contained in:
wenyifan
2023-12-28 17:33:48 +08:00
5 changed files with 13 additions and 5 deletions

View File

@ -149,7 +149,9 @@ func (d *kcpDialer) initSession(ctx context.Context, addr net.Addr, conn net.Pac
smuxConfig.Version = config.SmuxVer
smuxConfig.MaxReceiveBuffer = config.SmuxBuf
smuxConfig.MaxStreamBuffer = config.StreamBuf
smuxConfig.KeepAliveInterval = time.Duration(config.KeepAlive) * time.Second
if config.KeepAlive > 0 {
smuxConfig.KeepAliveInterval = time.Duration(config.KeepAlive) * time.Second
}
var cc net.Conn = kcpconn
if !config.NoComp {
cc = kcp_util.CompStreamConn(kcpconn)