diff --git a/Sources/Punchnet/SDLSuperClient.swift b/Sources/Punchnet/SDLSuperClient.swift index 5aafcc6..2622fb3 100644 --- a/Sources/Punchnet/SDLSuperClient.swift +++ b/Sources/Punchnet/SDLSuperClient.swift @@ -63,6 +63,9 @@ actor SDLSuperClient { group.addTask { try await self.asyncChannel.channel.closeFuture.get() NSLog("[SDLSuperClient] socket closed") + self.writeContinuation.finish() + self.inboundContinuation.finish() + throw SDLError.socketClosed } @@ -183,7 +186,6 @@ actor SDLSuperClient { deinit { try! group.syncShutdownGracefully() - self.inboundContinuation.finish() } }