[Mono-dev] What will happen if Dispose() hangs?

Edward Ned Harvey (mono) edward.harvey.mono at clevertrove.com
Tue Jan 27 14:46:29 UTC 2015

> From: Greg Najda [mailto:gregnajda at gmail.com]
> Regarding the TcpClient timeouts, if you are setting the timeout before
> connecting, it is ignored. That is a bug. See
> https://bugzilla.xamarin.com/show_bug.cgi?id=25365. As a workaround you
> can set the timeout after connecting.

Client-side, indeed I was setting timeout before connecting - Thanks for the tip.
Server-side, I was setting the timeout on the TcpClient after TcpListener.EndAcceptTcpClient.

And the problem I'm observing is server-side.  So unfortunately this workaround doesn't work for me (for this situation).

The question still stands about what happens if Dispose() hangs during garbage collection...

More information about the Mono-devel-list mailing list