mirror of https://github.com/OpenTTD/OpenTTD
(svn r14760) -Fix (rlongago): network connection of clients being closed twice (found due to added assertion in r14730)
parent
e626e07bd3
commit
105b84e343
|
@ -68,8 +68,6 @@ NetworkClientSocket::~NetworkClientSocket()
|
||||||
*/
|
*/
|
||||||
NetworkRecvStatus NetworkClientSocket::CloseConnection()
|
NetworkRecvStatus NetworkClientSocket::CloseConnection()
|
||||||
{
|
{
|
||||||
NetworkCloseClient(this);
|
|
||||||
|
|
||||||
/* Clients drop back to the main menu */
|
/* Clients drop back to the main menu */
|
||||||
if (!_network_server && _networking) {
|
if (!_network_server && _networking) {
|
||||||
_switch_mode = SM_MENU;
|
_switch_mode = SM_MENU;
|
||||||
|
@ -80,6 +78,7 @@ NetworkRecvStatus NetworkClientSocket::CloseConnection()
|
||||||
return NETWORK_RECV_STATUS_CONN_LOST;
|
return NETWORK_RECV_STATUS_CONN_LOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetworkCloseClient(this);
|
||||||
return NETWORK_RECV_STATUS_OKAY;
|
return NETWORK_RECV_STATUS_OKAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue