Remove an approximate two second delay in response to the first request from a new socket connection, only occuring on some Windows 10 machines. (#597)

A side-effect of this fix is that is also allows connections to IPv6 addresses.
This commit is contained in:
Ben Arnold
2021-03-21 08:12:19 +00:00
committed by GitHub
parent 2fb0f92a2d
commit 6f7d2c83f5
3 changed files with 49 additions and 3 deletions

View File

@@ -106,7 +106,7 @@ namespace WireMock.Owin
foreach (string address in addresses)
{
Urls.Add(address.Replace("0.0.0.0", "localhost"));
Urls.Add(address.Replace("0.0.0.0", "localhost").Replace("[::]", "localhost"));
PortUtils.TryExtract(address, out bool isHttps, out string protocol, out string host, out int port);
Ports.Add(port);