From c39ada25abb10e8b59c1e50b3ae57b4f76d44ab7 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 15 Dec 2018 00:30:38 +0100 Subject: [PATCH] Misc --- ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs b/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs index c406cb925..3bcb35d8d 100644 --- a/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs +++ b/ArchiSteamFarm/SteamKit2/ServerRecordEndPoint.cs @@ -46,7 +46,7 @@ namespace ArchiSteamFarm.SteamKit2 { private ServerRecordEndPoint() { } - public bool Equals(ServerRecordEndPoint other) => (Host == other.Host) && (Port == other.Port) && (ProtocolTypes == other.ProtocolTypes); + public bool Equals(ServerRecordEndPoint other) => (other != null) && (ReferenceEquals(other, this) || ((Host == other.Host) && (Port == other.Port) && (ProtocolTypes == other.ProtocolTypes))); public override bool Equals(object obj) => (obj != null) && ((obj == this) || (obj is ServerRecordEndPoint serverRecord && Equals(serverRecord))); public override int GetHashCode() => RuntimeCompatibility.HashCode.Combine(Host, Port, ProtocolTypes); }