fix: 修复闭包参数混用导致的编译错误

This commit is contained in:
wenzuhuai
2026-01-22 09:18:44 +08:00
parent e452971586
commit 387f6cf273

View File

@@ -937,7 +937,6 @@ class ConnectionHandler: ChannelInboundHandler {
if currentState == .disconnected || currentState == .closed {
return false // Already in disconnected/closed state
}
$0 = .disconnected
return true
}
@@ -945,6 +944,9 @@ class ConnectionHandler: ChannelInboundHandler {
return
}
// Set state to disconnected after check
state.withLockedValue { $0 = .disconnected }
// Clean up pending continuations to prevent leaks
if let continuation = serverInfoContinuation.withLockedValue({ cont in
let toResume = cont