Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
74667819
Commit
74667819
authored
May 16, 2017
by
justcoding121
Committed by
justcoding121
May 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert experimental changes
parent
c274e177
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
TcpConnection.cs
Titanium.Web.Proxy/Network/Tcp/TcpConnection.cs
+13
-1
TcpConnectionFactory.cs
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+0
-2
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+14
-7
No files found.
Titanium.Web.Proxy/Network/Tcp/TcpConnection.cs
View file @
74667819
...
...
@@ -58,7 +58,19 @@ namespace Titanium.Web.Proxy.Network.Tcp
StreamReader
?.
Dispose
();
TcpClient
?.
Close
();
try
{
if
(
TcpClient
!=
null
)
{
//This line is important!
//contributors please don't remove it without discussion
//It helps to avoid eventual deterioration of performance due to TCP port exhaustion
//due to default TCP CLOSE_WAIT timeout for 4 minutes
TcpClient
.
LingerState
=
new
LingerOption
(
true
,
0
);
TcpClient
.
Close
();
}
}
catch
{
}
}
}
}
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
74667819
...
...
@@ -125,8 +125,6 @@ namespace Titanium.Web.Proxy.Network.Tcp
client
.
ReceiveTimeout
=
server
.
ConnectionTimeOutSeconds
*
1000
;
client
.
SendTimeout
=
server
.
ConnectionTimeOutSeconds
*
1000
;
client
.
LingerState
=
new
LingerOption
(
true
,
0
);
Interlocked
.
Increment
(
ref
server
.
ServerConnectionCountField
);
return
new
TcpConnection
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
74667819
...
...
@@ -600,12 +600,6 @@ namespace Titanium.Web.Proxy
{
Interlocked
.
Increment
(
ref
clientConnectionCountField
);
//This line is important!
//contributors please don't remove it without discussion
//It helps to avoid eventual deterioration of performance due to TCP port exhaustion
//due to default TCP CLOSE_WAIT timeout for 4 minutes
tcpClient
.
LingerState
=
new
LingerOption
(
true
,
0
);
try
{
if
(
endPoint
.
GetType
()
==
typeof
(
TransparentProxyEndPoint
))
...
...
@@ -620,7 +614,20 @@ namespace Titanium.Web.Proxy
finally
{
Interlocked
.
Decrement
(
ref
clientConnectionCountField
);
tcpClient
?.
Close
();
try
{
if
(
tcpClient
!=
null
)
{
//This line is important!
//contributors please don't remove it without discussion
//It helps to avoid eventual deterioration of performance due to TCP port exhaustion
//due to default TCP CLOSE_WAIT timeout for 4 minutes
tcpClient
.
LingerState
=
new
LingerOption
(
true
,
0
);
tcpClient
.
Close
();
}
}
catch
{
}
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment