From 6ec8e375c4b756bcd323df6babd4a4a74cd75904 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 14 Apr 2017 13:06:13 -0400 Subject: Desktop preview --- ShiftOS_TheReturn/ServerManager.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ShiftOS_TheReturn/ServerManager.cs') diff --git a/ShiftOS_TheReturn/ServerManager.cs b/ShiftOS_TheReturn/ServerManager.cs index 4fce247..d356600 100644 --- a/ShiftOS_TheReturn/ServerManager.cs +++ b/ShiftOS_TheReturn/ServerManager.cs @@ -34,6 +34,7 @@ using System.Threading; using ShiftOS; using static ShiftOS.Engine.SaveSystem; using Newtonsoft.Json; +using System.Net.Sockets; namespace ShiftOS.Engine { @@ -191,8 +192,15 @@ namespace ShiftOS.Engine } }; - client.Connect(mud_address, port); - + try + { + client.Connect(mud_address, port); + } + catch(SocketException ex) + { + System.Diagnostics.Debug.Print(ex.ToString()); + Initiate(mud_address, port); + } } public static void SendMessage(string name, string contents) -- cgit v1.2.3