Commit 715a26d3 authored by Stéphane Graziano's avatar Stéphane Graziano

clientStream were undisposed.

```------------------------
//1st clientStream
var clientStream = new CustomBufferedStream(clientConnection.GetStream(), BufferPool, BufferSize);
sslStream = new SslStream(clientStream, false); //false => do not dispose 1st ClientStream
//2nd clientStream
clientStream = new CustomBufferedStream(sslStream, BufferPool, BufferSize);

...

sslStream?.Dispose(); // dispose sslStream but not 1st ClientStream
clientStream.Dispose(); // dispose 2nd ClientStream, sslStream (already disposed)
//here 1st clientStream is not disposed
```

------------------------
parent c8944308
......@@ -182,7 +182,7 @@ namespace Titanium.Web.Proxy
X509Certificate2 certificate = null;
try
{
sslStream = new SslStream(clientStream, true);
sslStream = new SslStream(clientStream, false);
string certName = HttpHelper.GetWildCardDomainName(connectHostname);
certificate = endPoint.GenericCertificate ??
......
......@@ -67,7 +67,7 @@ namespace Titanium.Web.Proxy
X509Certificate2 certificate = null;
try
{
sslStream = new SslStream(clientStream, true);
sslStream = new SslStream(clientStream, false);
string certName = HttpHelper.GetWildCardDomainName(httpsHostName);
certificate = endPoint.GenericCertificate ??
......
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