[Mono-dev] What will happen if Dispose() hangs?
Greg Najda
gregnajda at gmail.com
Tue Jan 27 13:49:18 UTC 2015
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.
On Mon, Jan 26, 2015 at 11:12 PM, Edward Ned Harvey (mono) <
edward.harvey.mono at clevertrove.com> wrote:
> When I call SslStream.Dispose(), the thread simply hangs indefinitely.
> (Well, I didn't wait forever; only a few minutes, which is longer than the
> underlying TcpClient timeout periods.)
>
>
>
> Obviously this is a bug, but my question is - What if I simply ignore the
> problem, and don't call Dispose, and just drop reference to the SslStream?
> Presumably the GC will call finalizer, which will then call Dispose().
> Will the GC thread also hang? Will it put mono into a bad state? What
> could possibly go wrong?
>
>
>
> Possibly related - I observed that when I set TcpClient read & write
> timeouts, they seem to have no effect. Set to 60000 (60sec), wait a few
> minutes on a Read or Write (actually BeginRead/EndRead, or synchronous
> Write) and nothing happens. Thread just blocks indefinitely or the end
> method is never called.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150127/7a84e247/attachment.html>
More information about the Mono-devel-list
mailing list