Update server.py

This commit is contained in:
Namhyeon Go 2024-11-14 15:26:09 +09:00 committed by GitHub
parent a50edb3c77
commit 50265ad56b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,6 +139,10 @@ def conn_string(conn: socket.socket, data: bytes, addr: bytes):
return True
return False
# debugging
logger.debug("@", addr)
logger.debug(">", data)
# JSON-RPC 2.0 request over Socket (stateful)
if data.find(b"{") == 0 and process_jsonrpc2(data):
# will be close by the client