Skip to content

Commit

Permalink
set write timeout only
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Feb 14, 2023
1 parent 5e66fda commit f8f99c6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f8f99c6

Please sign in to comment.