mirror of
https://github.com/xtaci/smux.git
synced 2024-04-21 10:51:48 +00:00
set write timeout only
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user