forked from quic-go/quic-go
implement sender side behavior for RESET_STREAM_AT (#5242)
* improve existing send stream test * implement sender side behavior for RESET_STREAM_AT * refactor send stream cancelation and shutdown error handling * correctly deal with 0-RTT corner case
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
type outgoingStream interface {
|
||||
updateSendWindow(protocol.ByteCount)
|
||||
enableResetStreamAt()
|
||||
closeForShutdown(error)
|
||||
}
|
||||
|
||||
@@ -204,6 +205,14 @@ func (m *outgoingStreamsMap[T]) UpdateSendWindow(limit protocol.ByteCount) {
|
||||
m.mutex.Unlock()
|
||||
}
|
||||
|
||||
func (m *outgoingStreamsMap[T]) EnableResetStreamAt() {
|
||||
m.mutex.Lock()
|
||||
for _, str := range m.streams {
|
||||
str.enableResetStreamAt()
|
||||
}
|
||||
m.mutex.Unlock()
|
||||
}
|
||||
|
||||
// unblockOpenSync unblocks the next OpenStreamSync go-routine to open a new stream
|
||||
func (m *outgoingStreamsMap[T]) maybeUnblockOpenSync() {
|
||||
if len(m.openQueue) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user