Merge pull request #10 from LeetCode-OpenSource/fix_race_conditions
Fix race condition on stopping lsp client
This commit is contained in:
commit
d4d59dc08c
@ -91,6 +91,9 @@ class LspEndpoint(threading.Thread):
|
|||||||
|
|
||||||
cond.acquire()
|
cond.acquire()
|
||||||
self.send_message(method_name, kwargs, current_id)
|
self.send_message(method_name, kwargs, current_id)
|
||||||
|
if self.shutdown_flag:
|
||||||
|
return None
|
||||||
|
|
||||||
cond.wait()
|
cond.wait()
|
||||||
cond.release()
|
cond.release()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user