Browse Source

Improved/safer reconnect routine

pull/3/head
JustinAJ 10 years ago
parent
commit
a0aedfda25
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 7
      RenX.Core/RenX_Server.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

7
RenX.Core/RenX_Server.cpp

@ -56,15 +56,14 @@ int RenX::Server::think()
}
else if (Jupiter::Socket::getLastError() != 10035) // This is a serious error
{
if (RenX::Server::reconnect())
RenX::Server::wipeData();
RenX::Server::sendLogChan(IRCCOLOR "07[Warning]" IRCCOLOR " Connection to Renegade-X server lost. Reconnection attempt in progress.");
if (RenX::Server::reconnect())
RenX::Server::sendLogChan(IRCCOLOR "06[Progress]" IRCCOLOR " Connection to Renegade-X server reestablished. Initializing Renegade-X RCON protocol...");
else
{
RenX::Server::wipeData();
RenX::Server::sendLogChan(IRCCOLOR "04[Error]" IRCCOLOR " Connection to Renegade-X server lost. Reconnection attempt failed.");
}
}
}
return 0;
}

Loading…
Cancel
Save