mirror of
https://github.com/xtaci/smux.git
synced 2024-04-21 10:51:48 +00:00
handle error in discard
This commit is contained in:
+1
-1
@@ -260,7 +260,7 @@ func (s *Session) recvLoop() {
|
||||
atomic.AddInt32(&s.bucket, -int32(written))
|
||||
stream.notifyReadEvent()
|
||||
} else { // discard
|
||||
io.CopyN(ioutil.Discard, s.conn, int64(hdr.Length()))
|
||||
written, err = io.CopyN(ioutil.Discard, s.conn, int64(hdr.Length()))
|
||||
}
|
||||
s.streamLock.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user