From 7ebee0d288ad2d5cabc3f5b960f6ec871c16c91e Mon Sep 17 00:00:00 2001 From: Ziya Suzen Date: Wed, 17 Apr 2024 10:26:25 +0100 Subject: [PATCH] Fixed upgradePromise leak (#66) --- Sources/Nats/NatsConnection.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Nats/NatsConnection.swift b/Sources/Nats/NatsConnection.swift index 4b997df..b15bd85 100644 --- a/Sources/Nats/NatsConnection.swift +++ b/Sources/Nats/NatsConnection.swift @@ -479,6 +479,7 @@ class ConnectionHandler: ChannelInboundHandler { // due to the promise originating on the event loop of the channel. try channel.pipeline.syncOperations.addHandler(sslHandler) } catch { + upgradePromise.fail(error) return channel.eventLoop.makeFailedFuture(error) } }