Skip to content

Commit

Permalink
handle error in discard
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci authored and xtaci committed Apr 18, 2019
1 parent a86d25d commit e12a73f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e12a73f

Please sign in to comment.