From 7438ec46696f955cf71f66308186b64b13ce2410 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 17 Jan 2012 06:02:54 +0000 Subject: [PATCH] - bugfix for windows users to be able to host games --- source/glest_game/network/connection_slot.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 9f4e8afad..0589c2cb3 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -1031,7 +1031,8 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) { } void ConnectionSlot::validateConnection() { - if(gotIntro == false && connectedTime > 0 && + if(this->isConnected() == true && + gotIntro == false && connectedTime > 0 && difftime(time(NULL),connectedTime) > GameConstants::maxClientConnectHandshakeSecs) { close(); } @@ -1063,6 +1064,7 @@ void ConnectionSlot::close() { ready = false; gotIntro = false; + connectedTime = 0; if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END\n",__FILE__,__FUNCTION__); }