Commit c752bf0a authored by titanium007's avatar titanium007

Fix web socket relay

parent d2c386f1
......@@ -112,8 +112,8 @@ namespace Titanium.Web.Proxy.Helpers
}
var sendRelay = new Task(() => StreamHelper.CopyTo(sb.ToString(), clientStream, tunnelStream, BUFFER_SIZE));
var receiveRelay = new Task(() => StreamHelper.CopyTo(tunnelStream, clientStream, BUFFER_SIZE));
var sendRelay = Task.Factory.StartNew(() => StreamHelper.CopyTo(sb.ToString(), clientStream, tunnelStream, BUFFER_SIZE));
var receiveRelay = Task.Factory.StartNew(() => StreamHelper.CopyTo(tunnelStream, clientStream, BUFFER_SIZE));
Task.WaitAll(sendRelay, receiveRelay);
}
......
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