Drain timed out remote daemon semaphores
This commit is contained in:
parent
d7d80ff5af
commit
8985f865e2
1 changed files with 3 additions and 0 deletions
|
|
@ -718,6 +718,9 @@ final class WorkspaceRemoteDaemonPendingCallRegistry {
|
|||
queue.sync {
|
||||
pendingCalls.removeValue(forKey: call.id)
|
||||
}
|
||||
// A response can win the race immediately before timeout cleanup removes the call.
|
||||
// Drain any late signal so DispatchSemaphore is not deallocated with a positive count.
|
||||
_ = call.semaphore.wait(timeout: .now())
|
||||
return .timedOut
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue