diff options
Diffstat (limited to 'ShiftOS.Server/Program.cs')
| -rw-r--r-- | ShiftOS.Server/Program.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index 9093c35..3f64054 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -121,8 +121,15 @@ namespace ShiftOS.Server server.OnClientAccepted += (o, a) => { Console.WriteLine("Client connected."); - server.DispatchTo(a.Guid, new NetObject("welcome", new ServerMessage { Name = "Welcome", Contents = a.Guid.ToString(), GUID = "Server" })); - }; + try + { + server.DispatchTo(a.Guid, new NetObject("welcome", new ServerMessage { Name = "Welcome", Contents = a.Guid.ToString(), GUID = "Server" })); + } + catch + { + Console.WriteLine("Oh, you don't have time to finish the handshake? Fine. Get off."); + } + }; server.OnClientDisconnected += (o, a) => { @@ -185,8 +192,11 @@ namespace ShiftOS.Server Console.WriteLine("Server stopping."); }; + + /* var task = ChatBackend.StartDiscordBots(); task.Wait(); + */ RandomUserGenerator.StartThread(); |
