forked from quic-go/quic-go
don't cancel streams after shutdown (#4673)
This ensures that `stream.Write` and `stream.Read` return the error code from connection close, if the stream was closed as a result of connection close.
This commit is contained in:
@@ -253,6 +253,9 @@ func (s *receiveStream) cancelReadImpl(errorCode qerr.StreamErrorCode) (queuedNe
|
||||
if s.cancelledLocally { // duplicate call to CancelRead
|
||||
return false
|
||||
}
|
||||
if s.closeForShutdownErr != nil {
|
||||
return false
|
||||
}
|
||||
s.cancelledLocally = true
|
||||
if s.errorRead || s.cancelledRemotely {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user