From 76fd253db77c34085214730fe416a314ae03ce9c Mon Sep 17 00:00:00 2001 From: George Barnett Date: Fri, 5 Jul 2024 14:41:39 +0100 Subject: [PATCH] Missed one --- .../AsyncChannel/AsyncChannelOutboundWriterHandler.swift | 4 ++-- Sources/NIOCore/Channel.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift index 8fa2111274..0e73fde347 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift @@ -137,7 +137,7 @@ internal final class NIOAsyncChannelOutboundWriterHandler @inlinable func handlerRemoved(context: ChannelHandlerContext) { self.context = nil - self.sink?.finish(error: ChannelError.ioOnClosedChannel) + self.sink?.finish(error: ChannelError._ioOnClosedChannel) self.writer = nil } @@ -150,7 +150,7 @@ internal final class NIOAsyncChannelOutboundWriterHandler @inlinable func channelInactive(context: ChannelHandlerContext) { - self.sink?.finish(error: ChannelError.ioOnClosedChannel) + self.sink?.finish(error: ChannelError._ioOnClosedChannel) context.fireChannelInactive() } diff --git a/Sources/NIOCore/Channel.swift b/Sources/NIOCore/Channel.swift index a6fbed7e43..b2523e955f 100644 --- a/Sources/NIOCore/Channel.swift +++ b/Sources/NIOCore/Channel.swift @@ -377,6 +377,7 @@ extension ChannelError { // 'any Error' is unconditionally boxed, avoid allocating per use by statically boxing them. static let _alreadyClosed: any Error = ChannelError.alreadyClosed static let _inputClosed: any Error = ChannelError.inputClosed + @usableFromInline static let _ioOnClosedChannel: any Error = ChannelError.ioOnClosedChannel static let _operationUnsupported: any Error = ChannelError.operationUnsupported static let _outputClosed: any Error = ChannelError.outputClosed