diff --git a/server/src/main.py b/server/src/main.py index 62582a2..a838154 100644 --- a/server/src/main.py +++ b/server/src/main.py @@ -83,6 +83,8 @@ class Server: else: command = "nop" conn.send(json.dumps({"command": command}).encode()) + except json.decoder.JSONDecodeError: + logger.error(f"Invalid JSON received from {addr}") except Exception as e: logger.error(f"Error handling agent {agent_id}: {e}") finally: