Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 8bc50e7

Browse files
committed
Fix bug in dispose param
1 parent 3ef9595 commit 8bc50e7

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internal SessionEventArgs()
3131
}
3232

3333
/// <summary>
34-
/// Holds a reference to server connection
34+
/// Holds a reference to client
3535
/// </summary>
3636
internal ProxyClient ProxyClient { get; set; }
3737

@@ -41,19 +41,14 @@ internal SessionEventArgs()
4141
public bool IsHttps => WebSession.Request.RequestUri.Scheme == Uri.UriSchemeHttps;
4242

4343

44-
public IPEndPoint ClientEndPoint => (IPEndPoint)TcpClient.Client.RemoteEndPoint;
44+
public IPEndPoint ClientEndPoint => (IPEndPoint)ProxyClient.TcpClient.Client.RemoteEndPoint;
4545

4646
/// <summary>
4747
/// A web session corresponding to a single request/response sequence
4848
/// within a proxy connection
4949
/// </summary>
5050
public HttpWebClient WebSession { get; set; }
5151

52-
/// <summary>
53-
/// Reference to client connection
54-
/// </summary>
55-
internal TcpClient TcpClient { get; set; }
56-
5752

5853
/// <summary>
5954
/// implement any cleanup here

Titanium.Web.Proxy/Http/HttpWebClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ namespace Titanium.Web.Proxy.Http
1111
{
1212
public class HttpWebClient
1313
{
14+
/// <summary>
15+
/// Connection to server
16+
/// </summary>
1417
internal TcpConnection ServerConnection { get; set; }
1518

1619
public Request Request { get; set; }

Titanium.Web.Proxy/Network/ProxyClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ namespace Titanium.Web.Proxy.Network
1010
public class ProxyClient
1111
{
1212
/// <summary>
13-
/// TcpClient used to communicate with server
13+
/// TcpClient used to communicate with client
1414
/// </summary>
1515
internal TcpClient TcpClient { get; set; }
1616

1717
/// <summary>
18-
/// holds the stream to server
18+
/// holds the stream to client
1919
/// </summary>
2020
internal Stream ClientStream { get; set; }
2121

2222
/// <summary>
23-
/// Used to read line by line from server
23+
/// Used to read line by line from client
2424
/// </summary>
2525
internal CustomBinaryReader ClientStreamReader { get; set; }
2626

2727
/// <summary>
28-
/// used to write line by line to server
28+
/// used to write line by line to client
2929
/// </summary>
3030
internal StreamWriter ClientStreamWriter { get; set; }
3131

Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private static async Task HandleHttpSessionRequest(TcpClient client, string http
198198
}
199199

200200
var args = new SessionEventArgs();
201-
args.TcpClient = client;
201+
args.ProxyClient.TcpClient = client;
202202

203203
try
204204
{

0 commit comments

Comments
 (0)