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:
Marten Seemann
2025-06-28 11:44:47 +08:00
committed by GitHub
parent b2f24318af
commit a2926a3603
10 changed files with 864 additions and 138 deletions

View File

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