in Sources/NIOTransportServices/NIOTSListenerBootstrap.swift [388:404]
func fireThroughPipeline(_ future: EventLoopFuture<Void>) {
ctxEventLoop.assertInEventLoop()
future.flatMap { (_) -> EventLoopFuture<Void> in
ctxEventLoop.assertInEventLoop()
guard context.channel.isActive else {
return newChannel.close().flatMapThrowing {
throw ChannelError.ioOnClosedChannel
}
}
context.fireChannelRead(self.wrapInboundOut(newChannel))
return context.eventLoop.makeSucceededFuture(())
}.whenFailure { error in
context.eventLoop.assertInEventLoop()
_ = newChannel.close()
context.fireErrorCaught(error)
}
}