handle error in discard

This commit is contained in:
xtaci
2019-04-18 12:14:47 +08:00
parent a86d25d4e7
commit e12a73f3f4
+1 -1
View File
@@ -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()