improved handling network errors (show message instead of stopping program)
authorHolger Schemel <info@artsoft.org>
Fri, 22 Jun 2018 19:25:22 +0000 (21:25 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 22 Jun 2018 19:25:22 +0000 (21:25 +0200)
src/init.c

index ffb825943520cec7a3ddf10f7b3b21622e62527f..9c9af0e90144197a94d2253ad0d38d50cb9e9c7d 100644 (file)
@@ -5620,7 +5620,13 @@ void InitNetworkServer()
     return;
 
   if (!ConnectToServer(network.server_host, network.server_port))
-    Error(ERR_EXIT, "cannot connect to network game server");
+  {
+    Request("Cannot connect to network server!", REQ_CONFIRM);
+
+    network.enabled = FALSE;
+
+    return;
+  }
 
   SendToServer_PlayerName(setup.player_name);
   SendToServer_ProtocolVersion();