1
0
Fork 0

Fix 3a1a915: Every 16th client never reconnects after server restart

pull/9679/head
dP 2021-11-03 23:33:38 +03:00 committed by Patric Stout
parent eb59912c65
commit 5e1164b093
1 changed files with 3 additions and 3 deletions

View File

@ -1055,9 +1055,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet
* care about the server shutting down. */ * care about the server shutting down. */
if (this->status >= STATUS_JOIN) { if (this->status >= STATUS_JOIN) {
/* To throttle the reconnects a bit, every clients waits its /* To throttle the reconnects a bit, every clients waits its
* Client ID modulo 16. This way reconnects should be spread * Client ID modulo 16 + 1 (value 0 means no reconnect).
* out a bit. */ * This way reconnects should be spread out a bit. */
_network_reconnect = _network_own_client_id % 16; _network_reconnect = _network_own_client_id % 16 + 1;
ShowErrorMessage(STR_NETWORK_MESSAGE_SERVER_REBOOT, INVALID_STRING_ID, WL_CRITICAL); ShowErrorMessage(STR_NETWORK_MESSAGE_SERVER_REBOOT, INVALID_STRING_ID, WL_CRITICAL);
} }