add debug
This commit is contained in:
parent
f410433aac
commit
5d87075108
@ -127,6 +127,7 @@ actor SDLSuperClient {
|
||||
} onCancel: {
|
||||
self.inboundContinuation.finish()
|
||||
self.writeContinuation.finish()
|
||||
self.logger.log("[SDLSuperClient] withTaskCancellationHandler cancel")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +66,10 @@ actor SDLUDPHole {
|
||||
self.eventContinuation.yield(.ready)
|
||||
try await withThrowingTaskGroup(of: Void.self) { group in
|
||||
group.addTask {
|
||||
defer {
|
||||
self.logger.log("[SDLUDPHole] inbound closed", level: .warning)
|
||||
}
|
||||
|
||||
for try await envelope in inbound {
|
||||
try Task.checkCancellation()
|
||||
|
||||
@ -94,6 +98,10 @@ actor SDLUDPHole {
|
||||
}
|
||||
|
||||
group.addTask {
|
||||
defer {
|
||||
self.logger.log("[SDLUDPHole] outbound closed", level: .warning)
|
||||
}
|
||||
|
||||
for try await message in self.writeStream {
|
||||
try Task.checkCancellation()
|
||||
|
||||
@ -107,13 +115,12 @@ actor SDLUDPHole {
|
||||
}
|
||||
|
||||
for try await _ in group { }
|
||||
|
||||
self.logger.log("[SDLUDPHole] group closed", level: .warning)
|
||||
}
|
||||
}
|
||||
} onCancel: {
|
||||
self.writeContinuation.finish()
|
||||
self.eventContinuation.finish()
|
||||
self.logger.log("[SDLUDPHole] withTaskCancellationHandler cancel")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user