From 5b57087ea23ae4b16356db19b4ab8ab1a5cc6b6f Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Fri, 1 Aug 2025 23:47:35 +0800 Subject: [PATCH] fix --- Sources/Punchnet/SDLNoticeClient.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sources/Punchnet/SDLNoticeClient.swift b/Sources/Punchnet/SDLNoticeClient.swift index 73d0afc..44cb4b3 100644 --- a/Sources/Punchnet/SDLNoticeClient.swift +++ b/Sources/Punchnet/SDLNoticeClient.swift @@ -48,10 +48,6 @@ actor SDLNoticeClient { try await self.asyncChannel.executeThenClose { inbound, outbound in try await withThrowingTaskGroup(of: Void.self) { group in group.addTask { - defer { - self.writeContinuation.finish() - } - for try await message in self.writeStream { let buf = self.asyncChannel.channel.allocator.buffer(bytes: message) let envelope = AddressedEnvelope(remoteAddress: self.remoteAddress, data: buf) @@ -72,5 +68,6 @@ actor SDLNoticeClient { deinit { try? self.group.syncShutdownGracefully() + self.writeContinuation.finish() } }