diff --git a/vendor/github.com/xtaci/smux/session.go b/vendor/github.com/xtaci/smux/session.go index c5b3060..3fad379 100644 --- a/vendor/github.com/xtaci/smux/session.go +++ b/vendor/github.com/xtaci/smux/session.go @@ -321,11 +321,6 @@ func (s *Session) recvLoop() { } } - // set timeout conn - if tconn, ok := s.conn.(interface{ SetReadDeadline(t time.Time) error }); ok { - tconn.SetReadDeadline(time.Now().Add(s.config.KeepAliveTimeout)) - } - // read header first if _, err := io.ReadFull(s.conn, hdr[:]); err == nil { atomic.StoreInt32(&s.dataReady, 1) @@ -524,7 +519,7 @@ func (s *Session) sendLoop() { // writeFrame writes the frame to the underlying connection // and returns the number of bytes written if successful func (s *Session) writeFrame(f Frame) (n int, err error) { - return s.writeFrameInternal(f, nil, 0) + return s.writeFrameInternal(f, time.After(s.config.KeepAliveTimeout), 0) } // internal writeFrame version to support deadline used in keepalive diff --git a/vendor/modules.txt b/vendor/modules.txt index 22ea96c..aa81921 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -38,7 +38,7 @@ github.com/urfave/cli # github.com/xtaci/kcp-go/v5 v5.6.2 ## explicit; go 1.13 github.com/xtaci/kcp-go/v5 -# github.com/xtaci/smux v1.5.21 +# github.com/xtaci/smux v1.5.22 ## explicit; go 1.13 github.com/xtaci/smux # github.com/xtaci/tcpraw v1.2.25