upd vendor

This commit is contained in:
xtaci
2023-02-14 20:47:58 +08:00
parent eed5f5ff0e
commit 0603885bb6
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -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
+1 -1
View File
@@ -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