mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-27 05:04:23 +00:00
Motivation: The stream channel updates its writability manager when issuing a write to the parent channel and when the write promise has been succeeded. If the write promise has already been succeeded then the writability manager can be updated in the wrong order which can lead to underflow. Modifications: - Use signed arithmetic in the writability manager and allow pending bytes to become (briefly) negative. Result: The writability manager's pending bytes shouldn't underflow.