Files
swift-nio/Sources
Franz Busch 5d7a9997e6 Throw an appropriate error from the writer when the channel closed (#2744)
# Motivation
Currently, when the channel closes and a user tries to write something the writer throws an `AlreadyFinished` error. This error can also be thrown when calling `finish` on the writer and then trying to call `write` again. This makes it hard to distinguish if the thrown error was due to the channel being closed or due to a business logic error in handling the writer.

# Modification
This PR finishes the writer with a `ChannelError.ioOnClosedChannel` if the writer gets finished to due a channel inactive or handler removed.

# Result
Users can now distinguish if they did something wrong with the writer or if the channel closed.
2024-06-24 07:11:36 -07:00
..
2024-01-16 03:30:26 -08:00