LspEndpoint: check server exit before parsing message
This commit is contained in:
parent
d4d59dc08c
commit
8d162afd48
@ -32,16 +32,15 @@ class LspEndpoint(threading.Thread):
|
||||
while not self.shutdown_flag:
|
||||
try:
|
||||
jsonrpc_message = self.json_rpc_endpoint.recv_response()
|
||||
if jsonrpc_message is None:
|
||||
print("server quit")
|
||||
break
|
||||
method = jsonrpc_message.get("method")
|
||||
result = jsonrpc_message.get("result")
|
||||
error = jsonrpc_message.get("error")
|
||||
rpc_id = jsonrpc_message.get("id")
|
||||
params = jsonrpc_message.get("params")
|
||||
|
||||
if jsonrpc_message is None:
|
||||
print("server quit")
|
||||
break
|
||||
|
||||
if method:
|
||||
if rpc_id:
|
||||
# a call for method
|
||||
|
Loading…
Reference in New Issue
Block a user