This commit is contained in:
anlicheng 2025-08-01 23:47:35 +08:00
parent b03159c693
commit 5b57087ea2

View File

@ -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<ByteBuffer>(remoteAddress: self.remoteAddress, data: buf)
@ -72,5 +68,6 @@ actor SDLNoticeClient {
deinit {
try? self.group.syncShutdownGracefully()
self.writeContinuation.finish()
}
}