Fucking shoot me.

This commit is contained in:
Michael VanOverbeek 2017-02-16 01:32:59 +00:00
parent a74031ae08
commit 5a89c2ad6b

View file

@ -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}] <ClientDispatcher> 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}] <ClientDispatcher> Dispatching to {cGuid}: {msgName}.");
}
else
{
Console.WriteLine($"[{DateTime.Now}] <ClientDispatcher> Client \"{cGuid}\" not found on server. Possibly a connection drop.");
}
}
else
catch
{
Console.WriteLine($"[{DateTime.Now}] <ClientDispatcher> Client \"{cGuid}\" not found on server. Possibly a connection drop.");
//FUCKING SHOOT ME.
}
}
}