We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7ff72e commit 4b2490cCopy full SHA for 4b2490c
dotnet/src/webdriver/Internal/PortUtilities.cs
@@ -32,13 +32,13 @@ public static class PortUtilities
32
/// Finds a random, free port to be listened on.
33
/// </summary>
34
/// <returns>A random, free port to be listened on.</returns>
35
- /// <exception cref="InvalidOperationException">
36
- /// Thrown when a free port cannot be found due to socket binding issues.
37
- /// </exception>
38
public static int FindFreePort()
39
{
40
var tcpListener = new TcpListener(IPAddress.IPv6Any, 0);
41
+ // Enable dual-mode to also work with IPv4 connections
+ tcpListener.Server.DualMode = true;
+
42
try
43
44
tcpListener.Start();
0 commit comments