Skip to content

Commit 70f9903

Browse files
committed
Move semaphore signaling to block main thread until request has received a reply instead of until it has been handled
This was causing the sourcekit-lsp integration test to fail.
1 parent a689a49 commit 70f9903

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ public final class JSONRPCConnection {
290290
messageHandlingQueue.async {
291291
await request._handle(self.receiveHandler!, id: id, connection: self) { (response, id) in
292292
self.sendReply(response, id: id)
293+
semaphore?.signal()
293294
}
294-
semaphore?.signal()
295295
}
296296
semaphore?.wait()
297297

0 commit comments

Comments
 (0)