Fixing issue #147: No longer show synchronization error, so that rejoin is possible if sync problems occur.

This commit is contained in:
lotodore
2012-09-08 11:53:28 +02:00
parent e6690633a2
commit e38b2665c0
+9 -3
View File
@@ -1409,10 +1409,16 @@ ClientStateSynchronizeStart::TimerLoop(const boost::system::error_code& ec, boos
}
void
ClientStateSynchronizeStart::InternalHandlePacket(boost::shared_ptr<ClientThread> /*client*/, boost::shared_ptr<NetPacket> tmpPacket)
ClientStateSynchronizeStart::InternalHandlePacket(boost::shared_ptr<ClientThread> client, boost::shared_ptr<NetPacket> 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);
}
}
//-----------------------------------------------------------------------------