Bugs item #1706, was opened at 2005-03-31 06:04
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1706&group_id=426

Category: Standard Library
Group: None
>Status: Closed
Resolution: Out of Date
Priority: 3
Submitted By: Lucas Nussbaum (lucas)
>Assigned to: Shugo Maeda (shugo)
Summary: net/imap + openssl hangs

Initial Comment:
As reported on the ruby-talk mailing list[0], I ran into a problem when
using net/imap and openssl to connect to IMAP servers using imaps.

The following code hangs, with no exception being raised :
require 'net/imap'
require 'openssl'
serveur, login, password = 'imap.apinc.org', 'lucaswebmail', 'password'
p imap = Net::IMAP::new(serveur, 993, true)
p imap.login(login, password)
imap.disconnect

I'm using Ruby 1.8.2 on Debian unstable.

Thank you

[0] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/135733

----------------------------------------------------------------------

>Comment By: Shugo Maeda (shugo)
Date: 2007-04-12 13:43

Message:
This bug is fixed in the repository.

----------------------------------------------------------------------

Comment By: Shugo Maeda (shugo)
Date: 2007-04-12 13:43

Message:
fixed in r12157(trunk) and r12158(ruby_1_8).

----------------------------------------------------------------------

Comment By: Adam Hewgill (ahewgill)
Date: 2006-12-13 09:36

Message:
This still exists in 1.8.5, here is the minimum to reproduce (you'll need an imap server to connect to):

require 'net/imap'
imap = Net::IMAP.new('your.server.com', 993, true)
imap.disconnect

I can't figure out how to open the bug, sorry.


----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2006-11-02 16:19

Message:
I'm closing this bug due to its age / staleness. I simply can't triage them all and I have 
to cut corners somewhere. If you believe this bug still exists in the latest version of 
ruby 1.8.x, please reopen it and, if you can, attach a minimally reproducible test case 
to help us repro it in 1.8.x (where x >= 5).

Thank you for your support. Things will get better.

Ryan Davis.

----------------------------------------------------------------------

Comment By: Justin Collins (presidentbeef)
Date: 2006-10-06 12:17

Message:
I was having this same issue, but it seems like using Net::IMAP#logout before disconnecting makes it not hang.

(I tried this on multiple servers with the same results. It hangs if you don't logout before disconnecting.)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1706&group_id=426