Commit 761aef5e authored by justcoding121's avatar justcoding121

move to contructor

parent 981a2dcc
...@@ -272,15 +272,14 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -272,15 +272,14 @@ namespace Titanium.Web.Proxy.Network.Tcp
ReceiveTimeout = proxyServer.ConnectionTimeOutSeconds * 1000, ReceiveTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
SendTimeout = proxyServer.ConnectionTimeOutSeconds * 1000, SendTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
SendBufferSize = proxyServer.BufferSize, SendBufferSize = proxyServer.BufferSize,
ReceiveBufferSize = proxyServer.BufferSize ReceiveBufferSize = proxyServer.BufferSize,
LingerState = new LingerOption(true, proxyServer.TcpTimeWaitSeconds)
}; };
if(proxyServer.ReuseSocket) if(proxyServer.ReuseSocket)
{ {
tcpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); tcpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
} }
tcpClient.LingerState = new LingerOption(true, proxyServer.TcpTimeWaitSeconds);
// If this proxy uses another external proxy then create a tunnel request for HTTP/HTTPS connections // If this proxy uses another external proxy then create a tunnel request for HTTP/HTTPS connections
if (useUpstreamProxy) if (useUpstreamProxy)
......
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