don't send a STOP_SENDING if the stream was already reset by the peer

This commit is contained in:
Marten Seemann
2019-01-22 20:57:06 +07:00
parent bfbf0bca48
commit 9888db457f
2 changed files with 27 additions and 23 deletions

View File

@@ -190,10 +190,7 @@ func (s *receiveStream) CancelRead(errorCode protocol.ApplicationErrorCode) erro
s.mutex.Lock()
defer s.mutex.Unlock()
if s.finRead {
return nil
}
if s.canceledRead {
if s.finRead || s.canceledRead || s.resetRemotely {
return nil
}
s.canceledRead = true