mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-25 04:47:50 +00:00
Correctly notify StreamMultiplexer of SETTINGS changes. (#67)
Motivation:
The StreamMultiplexer and StreamChannels are responsible for sending
WINDOW_UPDATE frames, but they were never told if the user changed the
value of SETTINGS_INITIAL_WINDOW_SIZE. They should be.
Modifications:
- Send user events when SETTINGS_INITIAL_WINDOW_SIZE changes.
- Use those window events to change the target window size in
HTTP2StreamChannel.
- Keep track of the last stream window size we knew.
Result:
Less chance of flow control mess.
This commit is contained in:
1 parent
1138881931
commit
55daa4cd4e
9 files changed
+155
-8
No files matched your search
@@ -464,6 +464,10 @@ extension NIOHTTP2Handler {
|
||||
if settingsChange.streamWindowSizeChange != 0 {
|
||||
self.outboundBuffer.initialWindowSizeChanged(settingsChange.streamWindowSizeChange)
|
||||
}
|
||||
case .localSettingsChanged(let settingsChange):
|
||||
if settingsChange.streamWindowSizeChange != 0 {
|
||||
self.inboundEventBuffer.pendingUserEvent(NIOHTTP2BulkStreamWindowChangeEvent(delta: settingsChange.streamWindowSizeChange))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user