Commit 4e1f3931 authored by justcoding121's avatar justcoding121

use IsClosed property

parent 272ef414
......@@ -271,7 +271,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
{
tcpClient = new TcpClient(upStreamEndPoint)
{
NoDelay = proxyServer.NoDelay,
NoDelay = proxyServer.NoDelay,
ReceiveTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
SendTimeout = proxyServer.ConnectionTimeOutSeconds * 1000,
LingerState = new LingerOption(true, proxyServer.TcpTimeWaitSeconds)
......@@ -416,7 +416,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
return;
}
if (close || connection.IsWinAuthenticated || !Server.EnableConnectionPool || connection.Stream.IsClosed)
if (close || connection.IsWinAuthenticated || !Server.EnableConnectionPool || connection.IsClosed)
{
disposalBag.Add(connection);
return;
......
......@@ -27,6 +27,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
private ProxyServer proxyServer { get; }
internal bool IsClosed => Stream.IsClosed;
internal ExternalProxy UpStreamProxy { get; set; }
internal string HostName { get; set; }
......
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