mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Motivation: There is currently a pair of windows in which it is possible for the HTTPServerUpgradeHandler to buffer some data without replaying it. This can happen if it is reentrantly called just after it finishes unbuffering data, which is not great. To avoid this, we move to execute this data delivery while we're removing ourselves. This ensures that we are confident that we cannot be reentrantly called after our last outcall, meaning we can be confident of 100% data delivery. Modifications: - Moved delayed data delivery to removeHandler. Result: Less chance of quiet data loss