Added Try-Catch to Client.Equals

This commit is contained in:
MaxXor 2015-09-01 09:35:56 +02:00
parent 7f013a505e
commit 1e8506470f
1 changed files with 8 additions and 1 deletions

View File

@ -102,7 +102,14 @@ private void OnClientWrite(IPacket packet, long length, byte[] rawData)
/// <returns></returns>
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;
}
}
/// <summary>