mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: There is at least a theoretical race to flush before close in prior version. Having terrible code in the NIO repo is asking for someone to copy it. Modifications: flatMap the various parts of the client together which also ensures the flush is complete before close is called. Result: Slightly nicer code, slightly fewer allocations.