fix oshttphost compare

This commit is contained in:
UbitUmarov
2020-11-13 12:07:01 +00:00
parent 19b26811c8
commit 06d669d9c7
3 changed files with 16 additions and 15 deletions

View File

@@ -319,18 +319,18 @@ namespace OpenSim.Framework
public int CompareTo(OSHHTPHost other)
{
if (((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0)
if (Port == other.Port && ((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0)
{
return URI.CompareTo(other.Host);
return Host.CompareTo(other.Host);
}
return -1;
}
public bool Equals(OSHHTPHost other)
{
if (((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0)
if (Port == other.Port && ((Flags & other.Flags) & OSHTTPURIFlags.ValidHost) != 0)
{
return URI.Equals(other.URI);
return Host.Equals(other.Host);
}
return false;
}