From ea847eb074ff3b8176cdcbfc2e1d50ea8ed153ab Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 12 Jun 2019 12:04:45 +0300 Subject: [PATCH] (face37755) Fixed clients timing out when trying to connect to a server that has banned someone. Closes #1568 --- Barotrauma/BarotraumaServer/Source/Networking/BanList.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Barotrauma/BarotraumaServer/Source/Networking/BanList.cs b/Barotrauma/BarotraumaServer/Source/Networking/BanList.cs index 9103fee86..b7a9b438f 100644 --- a/Barotrauma/BarotraumaServer/Source/Networking/BanList.cs +++ b/Barotrauma/BarotraumaServer/Source/Networking/BanList.cs @@ -35,6 +35,7 @@ namespace Barotrauma.Networking public bool CompareTo(string ipCompare) { + if (string.IsNullOrEmpty(IP)) { return false; } if (!IsRangeBan) { return ipCompare == IP; @@ -49,6 +50,7 @@ namespace Barotrauma.Networking public bool CompareTo(IPAddress ipCompare) { + if (string.IsNullOrEmpty(IP)) { return false; } if (ipCompare.IsIPv4MappedToIPv6 && CompareTo(ipCompare.MapToIPv4().ToString())) { return true;