Bug Description
If the UDP message received on port 50001 doesn't start with "CHAT_SERVER", the function skips the if block and returns None. The client then tries to unpack it:
server_ip, server_port = find_server() # TypeError: cannot unpack non-iterable NoneType
Any rogue UDP traffic on port 50001 that arrives before the real server broadcast will crash the client. The socket also leaks (never closed) in this case.
File & Lines
client code 2.py — lines 93–107, 623
Severity
Critical — any stray UDP packet on port 50001 crashes the client.
Bug Description
If the UDP message received on port 50001 doesn't start with
"CHAT_SERVER", the function skips theifblock and returnsNone. The client then tries to unpack it:Any rogue UDP traffic on port 50001 that arrives before the real server broadcast will crash the client. The socket also leaks (never closed) in this case.
File & Lines
client code 2.py— lines 93–107, 623Severity
Critical — any stray UDP packet on port 50001 crashes the client.