diff --git a/client.py b/client.py index 473e245f9b50cc5fb007309acf3bcb9efce05bd6..d6076543d1dcd797d638e691245f2729fc439778 100644 --- a/client.py +++ b/client.py @@ -28,17 +28,13 @@ user_input = input("Enter username: ") while connect: server_msg = send(user_input) print(server_msg) - user_input = input() - if user_input.upper() == "BYE" or server_msg == "ERR" or server_msg == "DONE" or server_msg == "END": + if server_msg == "ERR" or server_msg == "DONE" or server_msg == "END": connect = False + else: + user_input = input() + if user_input.upper() == "BYE": + connect = False # disconnect print(send("BYE")) - - - - - - -