From 1e8506470f051de3522acdb2dde6134cd131e399 Mon Sep 17 00:00:00 2001 From: MaxXor Date: Tue, 1 Sep 2015 09:35:56 +0200 Subject: [PATCH] Added Try-Catch to Client.Equals --- Server/Core/Networking/Client.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Server/Core/Networking/Client.cs b/Server/Core/Networking/Client.cs index 366f8d1c..08570040 100644 --- a/Server/Core/Networking/Client.cs +++ b/Server/Core/Networking/Client.cs @@ -102,7 +102,14 @@ private void OnClientWrite(IPacket packet, long length, byte[] rawData) /// public bool Equals(Client c) { - return this.EndPoint.Port == c.EndPoint.Port; // this port is always unique for each client + try + { + return this.EndPoint.Port == c.EndPoint.Port; // this port is always unique for each client + } + catch (Exception) + { + return false; + } } ///