From 5a89c2ad6b644f94d1a72d91f431852069a0c6cd Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Thu, 16 Feb 2017 01:32:59 +0000 Subject: [PATCH] Fucking shoot me. --- ShiftOS.Server/Program.cs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index 4a352fe..4db3894 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -505,19 +505,26 @@ namespace ShiftOS.Server public void DispatchTo(string msgName, string cGuid, object mContents) { - if(Server.Clients.Contains(new Guid(cGuid))) + try { - Server.DispatchTo(new Guid(cGuid), new NetObject("dispatch", new ServerMessage + if (Server.Clients.Contains(new Guid(cGuid))) { - Name = msgName, - GUID = DispatcherGUID, - Contents = JsonConvert.SerializeObject(mContents) - })); - Console.WriteLine($"[{DateTime.Now}] Dispatching to {cGuid}: {msgName}."); + Server.DispatchTo(new Guid(cGuid), new NetObject("dispatch", new ServerMessage + { + Name = msgName, + GUID = DispatcherGUID, + Contents = JsonConvert.SerializeObject(mContents) + })); + Console.WriteLine($"[{DateTime.Now}] Dispatching to {cGuid}: {msgName}."); + } + else + { + Console.WriteLine($"[{DateTime.Now}] Client \"{cGuid}\" not found on server. Possibly a connection drop."); + } } - else + catch { - Console.WriteLine($"[{DateTime.Now}] Client \"{cGuid}\" not found on server. Possibly a connection drop."); + //FUCKING SHOOT ME. } } }