NEventSocket icon indicating copy to clipboard operation
NEventSocket copied to clipboard

Cancel networkStream.ReadAscync() on socket shutdown

Open danbarua opened this issue 9 years ago • 0 comments

Issue from LinkedIn:

Dan,
Is there any way I could cancel ReadAsync on NetworkStream object.
We get some threads blocked and can't close TcpClient underlying tcp connection. The reason i am asking as ReadAsync is overloaded method.
ReadAsync(Byte[], Int32, Int32, CancellationToken)
Any help will be greatly appreciated.
Best regards,
Rus

danbarua avatar Jan 11 '17 22:01 danbarua