Skip to content

Commit 85413d3

Browse files
authored
Merge branch 'main' into BDN/sorted-set
2 parents 3dc5159 + 91644c8 commit 85413d3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

libs/host/Configuration/Options.cs

+12-4
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,18 @@ public GarnetServerOptions GetServerOptions(ILogger logger = null)
610610
}
611611
else
612612
{
613-
var address = string.IsNullOrEmpty(Address) || Address.Equals("localhost", StringComparison.CurrentCultureIgnoreCase)
614-
? IPAddress.Loopback
615-
: IPAddress.Parse(Address);
616-
613+
IPAddress address;
614+
if (string.IsNullOrEmpty(Address))
615+
{
616+
address = IPAddress.Any;
617+
}
618+
else
619+
{
620+
if (Address.Equals("localhost", StringComparison.CurrentCultureIgnoreCase))
621+
address = IPAddress.Loopback;
622+
else
623+
address = IPAddress.Parse(Address);
624+
}
617625
endpoint = new IPEndPoint(address, Port);
618626
}
619627

0 commit comments

Comments
 (0)