From e38b2665c0e205928258d2377322ca6611a42f21 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 8 Sep 2012 11:53:28 +0200 Subject: [PATCH] Fixing issue #147: No longer show synchronization error, so that rejoin is possible if sync problems occur. --- src/net/common/clientstate.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index a98938fe..1eb0dfad 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -1409,10 +1409,16 @@ ClientStateSynchronizeStart::TimerLoop(const boost::system::error_code& ec, boos } void -ClientStateSynchronizeStart::InternalHandlePacket(boost::shared_ptr /*client*/, boost::shared_ptr tmpPacket) +ClientStateSynchronizeStart::InternalHandlePacket(boost::shared_ptr client, boost::shared_ptr tmpPacket) { - if (tmpPacket->GetMsg()->present == PokerTHMessage_PR_gameStartMessage) - throw ClientException(__FILE__, __LINE__, ERR_NET_START_TIMEOUT, 0); + if (tmpPacket->GetMsg()->present == PokerTHMessage_PR_gameStartMessage) { + // Try to start anyway. Terminating here is very bad because rejoin is not possible then. + // Unsubscribe lobby messages. + client->UnsubscribeLobbyMsg(); + client->SetState(ClientStateWaitStart::Instance()); + // Forward the game start message to the next state. + client->GetState().HandlePacket(client, tmpPacket); + } } //-----------------------------------------------------------------------------