fix quicClient

This commit is contained in:
anlicheng 2026-04-29 14:57:07 +08:00
parent 1d19f727d3
commit b0172444c6

View File

@ -265,6 +265,7 @@ actor SDLContextActor {
defer { defer {
quicClient.stop() quicClient.stop()
SDLLogger.log("[SDLContext] quicClient: stop")
} }
// quic // quic
@ -509,7 +510,7 @@ actor SDLContextActor {
self.udpHoleV6 = nil self.udpHoleV6 = nil
self.udpHoleV6LocalAddress = nil self.udpHoleV6LocalAddress = nil
await self.quicClient?.stop() self.quicClient?.stop()
self.quicClient = nil self.quicClient = nil
await self.dnsClient?.stop() await self.dnsClient?.stop()
@ -630,7 +631,7 @@ actor SDLContextActor {
// //
self.readTask = Task.detached(priority: .high) { self.readTask = Task.detached(priority: .high) {
while true { repeat {
if Task.isCancelled { if Task.isCancelled {
return return
} }
@ -641,7 +642,7 @@ actor SDLContextActor {
await self.dealTunPacket(packet: ipPacket) await self.dealTunPacket(packet: ipPacket)
} }
} }
} } while true
} }
} }