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
c274e177
Commit
c274e177
authored
May 16, 2017
by
justcoding121
Committed by
justcoding121
May 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#231 Fix server count; don't dispose twice
parent
668bc0f2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
30 deletions
+60
-30
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+51
-24
ResponseHandler.cs
Titanium.Web.Proxy/ResponseHandler.cs
+9
-6
No files found.
Titanium.Web.Proxy/RequestHandler.cs
View file @
c274e177
This diff is collapsed.
Click to expand it.
Titanium.Web.Proxy/ResponseHandler.cs
View file @
c274e177
...
...
@@ -23,7 +23,7 @@ namespace Titanium.Web.Proxy
/// Called asynchronously when a request was successfully and we received the response
/// </summary>
/// <param name="args"></param>
/// <returns>true if
no errors
</returns>
/// <returns>true if
client/server connection was terminated (and disposed)
</returns>
private
async
Task
<
bool
>
HandleHttpSessionResponse
(
SessionEventArgs
args
)
{
try
...
...
@@ -130,12 +130,12 @@ namespace Titanium.Web.Proxy
Dispose
(
args
.
ProxyClient
.
ClientStream
,
args
.
ProxyClient
.
ClientStreamReader
,
args
.
ProxyClient
.
ClientStreamWriter
,
args
.
WebSession
.
ServerConnection
);
return
fals
e
;
return
tru
e
;
}
args
.
Dispose
();
return
tru
e
;
return
fals
e
;
}
/// <summary>
...
...
@@ -233,15 +233,18 @@ namespace Titanium.Web.Proxy
StreamWriter
clientStreamWriter
,
TcpConnection
serverConnection
)
{
Interlocked
.
Decrement
(
ref
ServerConnectionCountField
);
clientStream
?.
Close
();
clientStream
?.
Dispose
();
clientStreamReader
?.
Dispose
();
clientStreamWriter
?.
Dispose
();
serverConnection
?.
Dispose
();
if
(
serverConnection
!=
null
)
{
serverConnection
.
Dispose
();
Interlocked
.
Decrement
(
ref
ServerConnectionCountField
);
}
}
}
}
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