Unverified Commit 7f3ef041 authored by Allen Byron Penner's avatar Allen Byron Penner Committed by GitHub

Update ProxyServer.cs

enable socket reuse based on framework via RunTime.IsSocketReuseAvailable
parent 20c22ddc
......@@ -654,8 +654,7 @@ namespace Titanium.Web.Proxy
{
endPoint.Listener = new TcpListener(endPoint.IpAddress, endPoint.Port);
// linux/macOS has a bug with socket reuse in .net core.
if (ReuseSocket && RunTime.IsWindows)
if (ReuseSocket && RunTime.IsSocketReuseAvailable)
{
endPoint.Listener.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment