mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
### Motivation * `testHalfCloseOwnOutputWithPopulatedBuffer` asserts that writing to a half-closed channel produces `ChannelError.outputClosed`. However, after flushing the buffered write and the FIN, the remote peer can process both and fully close the connection before the subsequent write is processed. When this happens the channel is fully closed and the write fails with `.ioOnClosedChannel` instead. * This race seems to be more likely on iOS simulators in CI. ### Modifications * Accept either `.outputClosed` or `.ioOnClosedChannel` as valid errors from the post-half-close write. ### Result * The test no longer flakes on iOS simulator CI runs.