If a connecting client sends a malformed id/port message, server will throw an uncaught exception.
In run(), I threw a try/except around the split to catch the error, but maybe there are better solutions?
if ":" in connected_node_id:
print("Got connected node id", connected_node_id)
try:
(connected_node_id, connected_node_port) = connected_node_id.split(':') # When a node is connected, it sends it id!
except Exception as e:
print(e)
connection.close()
continue
If a connecting client sends a malformed id/port message, server will throw an uncaught exception.
In run(), I threw a try/except around the split to catch the error, but maybe there are better solutions?