Commit 1bce2480 authored by Honfika's avatar Honfika

small cleanup

parent 3e7c8499
...@@ -51,7 +51,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network ...@@ -51,7 +51,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network
try try
{ {
var method = typeof(NetworkStream).GetMethod(nameof(Stream.ReadAsync), var method = typeof(NetworkStream).GetMethod(nameof(Stream.ReadAsync),
new Type[] { typeof(byte[]), typeof(int), typeof(int), typeof(CancellationToken) }); new[] { typeof(byte[]), typeof(int), typeof(int), typeof(CancellationToken) });
if (method != null && method.DeclaringType != typeof(Stream)) if (method != null && method.DeclaringType != typeof(Stream))
{ {
networkStreamHack = false; networkStreamHack = false;
...@@ -684,8 +684,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network ...@@ -684,8 +684,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network
return ((TaskResult<int>)asyncResult).Result; return ((TaskResult<int>)asyncResult).Result;
} }
/// <summary> /// <summary>
/// Fix the .net bug with SslStream slow WriteAsync /// Fix the .net bug with SslStream slow WriteAsync
/// https://github.com/justcoding121/Titanium-Web-Proxy/issues/495 /// https://github.com/justcoding121/Titanium-Web-Proxy/issues/495
...@@ -709,6 +708,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network ...@@ -709,6 +708,7 @@ namespace Titanium.Web.Proxy.StreamExtended.Network
return vAsyncResult; return vAsyncResult;
} }
public override void EndWrite(IAsyncResult asyncResult) public override void EndWrite(IAsyncResult asyncResult)
{ {
if (!networkStreamHack) if (!networkStreamHack)
......
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