Unverified Commit 3ad8b0d4 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 ec063fef
...@@ -654,8 +654,7 @@ namespace Titanium.Web.Proxy ...@@ -654,8 +654,7 @@ namespace Titanium.Web.Proxy
{ {
endPoint.Listener = new TcpListener(endPoint.IpAddress, endPoint.Port); endPoint.Listener = new TcpListener(endPoint.IpAddress, endPoint.Port);
// linux/macOS has a bug with socket reuse in .net core. if (ReuseSocket && RunTime.IsSocketReuseAvailable)
if (ReuseSocket && RunTime.IsWindows)
{ {
endPoint.Listener.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); 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