Open ste-art opened 8 years ago
The situation "e.BytesTransferred == 0" means the connection was closed.
I'm experiencing the same CPU intensive processing threads left behind on non-working proxies even though the WebSocket is properly disposed. Was this issue addressed in the latest release?
Thanks, Daniel
Websocket can hang if used with some proxies.
After calling
WebSocket.Open
no events (OnWsClosed, OnWsOpened, OnWsError
) are raised and some internal thread starts to generate high CPU usage.More info:
ProxyConnectorBase.AsyncEventArgsCompleted
receives an empty buffer -SocketAsyncEventArgs.Buffer
is filled with zeros,Offset
andBytesTransferred
are 0. It callsHttpConnectProxy.ProcessReceive
wheree.Buffer.SearchMark
returns -1 and executes this code:total
becomes 0 too, thenStartReceive
is called, that raisesProxyConnectorBase.AsyncEventArgsCompleted
with empty buffer again and this loop continues infinitely.I suggest a fix:
But I'm not sure could BytesTransferred be zero in other healthy TCP connections.
Proxies to debug the issue with (there are plenty of them in varios online free proxies lists): 111.13.136.46:80 139.162.182.113:80 202.43.147.226:1080