mirror of https://github.com/quasar/Quasar.git
Added Try-Catch to Client.Equals
This commit is contained in:
parent
7f013a505e
commit
1e8506470f
|
@ -101,9 +101,16 @@ private void OnClientWrite(IPacket packet, long length, byte[] rawData)
|
|||
/// <param name="c">Client to compare with.</param>
|
||||
/// <returns></returns>
|
||||
public bool Equals(Client c)
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.EndPoint.Port == c.EndPoint.Port; // this port is always unique for each client
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type of the packet received.
|
||||
|
|
Loading…
Reference in New Issue