Fix crash if client's connection fails during error sending

pull/451/head
Jonathan G Rennison 2 years ago
parent ff0bed96a4
commit 3665c01539

@ -243,7 +243,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
/* This means the server closed the connection. Emergency save is /* This means the server closed the connection. Emergency save is
* already created if this was appropriate during handling of the * already created if this was appropriate during handling of the
* disconnect. */ * disconnect. */
this->SendPackets(); this->SendPackets(true);
this->CloseConnection(res); this->CloseConnection(res);
} else { } else {
/* This means we as client made a boo-boo. */ /* This means we as client made a boo-boo. */
@ -252,7 +252,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
/* Close connection before we make an emergency save, as the save can /* Close connection before we make an emergency save, as the save can
* take a bit of time; better that the server doesn't stall while we * take a bit of time; better that the server doesn't stall while we
* are doing the save, and already disconnects us. */ * are doing the save, and already disconnects us. */
this->SendPackets(); this->SendPackets(true);
this->CloseConnection(res); this->CloseConnection(res);
ClientNetworkEmergencySave(); ClientNetworkEmergencySave();
} }

Loading…
Cancel
Save