Skip to content

Commit fd166e4

Browse files
authored
Merge pull request #839 from ahoppen/ahoppen/fix-integration-test
Move semaphore signaling to block main thread until request has received a reply instead of until it has been handled
2 parents a689a49 + 70f9903 commit fd166e4

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)