From: Bealach Na Bo Date: 2006-05-01T07:29:08+09:00 Subject: Re: IMAP disconnect broken? On 5/1/06, Stuart Stegall wrote: > Eric Hodel wrote: > > On Apr 28, 2006, at 2:58 PM, Stuart Stegall wrote: > > > >> Eric Hodel wrote: > >>> > >>> On Apr 25, 2006, at 2:21 PM, Bealach Na Bo wrote: > >>> > >>>> Hi folks, > >>>> > >>>> New Ruby convert here :) > >>>> > >>>> I'm using the standard Net::IMAP and OpenSSL libraries to connect to > >>>> an IMAP server. > >>>> I can connect, examine and manipulate my INBOX, but when call the > >>>> disconnect method of the imap instance it just hangs. The minimal > >>>> version is almost identical to > >>>> the example on page 701 of "Programming Ruby". Should I be calling > >>>> some other method? > >>> > >>> I don't know, the disconnect method is suspect: > >>> > >>> # Disconnects from the server. > >>> def disconnect > >>> @sock.shutdown unless @usessl > >>> @receiver_thread.join > >>> @sock.close > >>> end > >>> > >> I cannot replicate the problem with my imap4 server. > > > > Did you use SSL? > > > > I have Dovecot. > > > I used SSL and I tried it on Gentoo Linux and Windows. The Windows is > all my own compiling as I am using the Intel C++ compiler to compile > everything (which of course causes me problems with some > gems/addons/libraries as they are precompiled for Windows and do not > include nmake makefile or VS project files and then I have to TRY to > manually make a makefile for them) > > But I digress, on both platforms, I got the exact same lack of a problem. > > Is your code anything like what I posted (quoting from "Programming Ruby")? I've tried that code in Debian, WinXP pro (SP2) and Win2003 all with ruby 1.8.4 and all of them hang at exactly the same place. Can you post some example code if it's different to what I posted. Regards, Bealach