summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-12-09 22:53:05 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-12-09 22:53:05 +0100
commita7c44e2839fabfe55a488a74f2031b3ffbaf7989 (patch)
tree44175261315e630b0baa4c44e6738b015fc5f456 /server
parent2ce64cf1b7b8d9742b5098b2e2cc425528bbdf55 (diff)
Retry waiting for a Ready message if wrong message was received.
Diffstat (limited to 'server')
-rw-r--r--server/client.cpp2
1 files changed, 2 insertions, 0 deletions
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<void (int)> lobby_call
void Client::handle_ready(Message::p msg, boost::function<void ()> 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;
}