Fix race condition on stopping lsp client

This commit is contained in:
Ashish Bansal 2019-12-08 00:09:38 +05:30
parent b5d7829011
commit ff6c2e7f15
No known key found for this signature in database
GPG Key ID: EE0F496D423CE445
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ class LspEndpoint(threading.Thread):
self.event_dict[current_id] = cond
cond.acquire()
self.send_message(method_name, kwargs, current_id)
if self.shutdown_flag:
return None
cond.wait()
cond.release()
result, error = self.response_dict[current_id]