Patches: Browse | Submit New | Admin

[#12385] Net::IMAP.disconnect hangs

Date:
2007-07-18 22:18
Priority:
3
Submitted By:
Bill Hwang (bhwang)
Assigned To:
Akinori MUSHA (knu)
Category:
Network / Comm / Protocols
State:
Open
Summary:
Net::IMAP.disconnect hangs

Detailed description
Following scenario will cause the hang

imap = Net::IMAP.new('mail.example.com')
imap.disconnect

This is because disconnect method waits on graceful shut down of the receiver thread which will never happen.  The most
likely scenario is that the IMAP server will send an untagged BYE due to idle timeout.  That will trigger ByeResponseError
exception, a rather undesirable side effect.

The patch changes how disconnect method is implemented.  Receiver thread will killed after if it doesn't shut down gracefully
after a short time interval.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
ruby-changes.patch change to disconnect Download

Changes:

Field Old Value Date By
File Added2255: ruby-changes.patch2007-07-18 22:18bhwang