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:
sukun
2024-09-14 10:17:48 +05:30
committed by GitHub
parent 672f906a40
commit d22d579733
4 changed files with 27 additions and 0 deletions

View File

@@ -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