mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: Because EmbeddedChannel used to treat all writes as flushed the test that tested that we do send out the WebSockets connection close frame didn't actually test the right thing. Now that EmbeddedChannel behaves more realisticly, this test actually fails. This fixes the bug and the test that tests that a WebSockets connection is successfully torn down after an error occured. Modifications: - use `writeAndFlush` to send out the connection close frame. Result: WebSockets connection actually gets closed on error.