Do not shut up exception propagation by providing empty exception handler (in practice, do it less often then never:); I hope this is what you really do in real life).
I think once you specify
ReadTimeout
, it always work. But! chances are you have overlooked the situation when either
SocketException
or
IOException
was thrown even before entering your thread's wait state. This is by far the most typical reason for the problems of a kind you observe.
Provide a full dump of those two exceptions (do not do this assertion you commented out) and you will see the result, analyze it.
If you have caught one of the exception but fail to figure out the problem, please submit the text of your dump here so I could see it.
To provide good exception dump, you could use, for example, my code I advice in different answer,
here.
Thank you.