mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-27 05:04:24 +00:00
Motivation: When we read a CLOSE_NOTIFY message, we immediately begin closing the connection down. This *can* cause an instant close, and if that occurs then we will have un-flushed data in the read buffer that we never deliver. If we receive a CLOSE_NOTIFY we will not receive more application data, so we should deliver all that application data before we initiate the shutdown process. Modifications: Unbuffer the buffered reads when we read a CLOSE_NOTIFY. Result: All reads will be shipped before channelInactive can fire.