summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-28 21:45:41 +0000
committerrubidium <rubidium@openttd.org>2008-12-28 21:45:41 +0000
commit3b08d2ecaab8b34e93a49aebafed9a746b391b39 (patch)
treef3ab35850d4bf64dafcac8b2257d031d456d62a5 /src/network
parent5fe023cb1beaa8fbfd3a78e68495abbabc4236c8 (diff)
downloadopenttd-3b08d2ecaab8b34e93a49aebafed9a746b391b39.tar.xz
(svn r14760) -Fix (rlongago): network connection of clients being closed twice (found due to added assertion in r14730)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/tcp.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp
index 304e1d37e..96b6dfbb0 100644
--- a/src/network/core/tcp.cpp
+++ b/src/network/core/tcp.cpp
@@ -68,8 +68,6 @@ NetworkClientSocket::~NetworkClientSocket()
*/
NetworkRecvStatus NetworkClientSocket::CloseConnection()
{
- NetworkCloseClient(this);
-
/* Clients drop back to the main menu */
if (!_network_server && _networking) {
_switch_mode = SM_MENU;
@@ -80,6 +78,7 @@ NetworkRecvStatus NetworkClientSocket::CloseConnection()
return NETWORK_RECV_STATUS_CONN_LOST;
}
+ NetworkCloseClient(this);
return NETWORK_RECV_STATUS_OKAY;
}