From a7c44e2839fabfe55a488a74f2031b3ffbaf7989 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 9 Dec 2010 22:53:05 +0100 Subject: Retry waiting for a Ready message if wrong message was received. --- server/client.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server') diff --git a/server/client.cpp b/server/client.cpp index aa0cdb7..2155359 100644 --- a/server/client.cpp +++ b/server/client.cpp @@ -84,6 +84,8 @@ void Client::handle_lobby(Message::p msg, boost::function lobby_call void Client::handle_ready(Message::p msg, boost::function ready_callback) { if(msg->type != Message::Types::Ready) { + // Wait for another message. + connection->recv(boost::bind(&Client::handle_ready, shared_from_this(), _1, ready_callback)); return; } -- cgit v1.2.3