diff --git a/check_input.cpp b/check_input.cpp index baf352a..891637d 100644 --- a/check_input.cpp +++ b/check_input.cpp @@ -62,14 +62,13 @@ GameType check_client(char* code_text) { client->create_socket(); /* Send a specific message to the server, and wait for the appropriate response, to know that the server is ready */ client->sendAll("GG"); -// display_text_centered("Connecting..."); - std::string msg_from_server = client->recvAll(); + std::string msg_from_server = client->recvAllNB(); if (msg_from_server == "U2") { display_text_centered("Connection made"); Timer timer = timer_init(3); while (!timer_done(timer)); } else { - throw EXCEPT_WRONGRESPONSE; + throw std::invalid_argument("Server didn't respond with correct message."); } type.mode = M_CLIENT; type.netsock = client;