mirror of
https://github.com/xtaci/kcptun.git
synced 2024-04-21 12:32:32 +00:00
upd vendor
This commit is contained in:
+1
-6
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user