[ python-Bugs-977680 ] IMAP4_SSL() class incompatible with socket.timeout

SourceForge.net noreply at sourceforge.net
Sat Jul 10 23:29:31 CEST 2004


Bugs item #977680, was opened at 2004-06-22 11:13
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977680&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Charles (melicertes)
Assigned to: Nobody/Anonymous (nobody)
Summary: IMAP4_SSL() class incompatible with socket.timeout

Initial Comment:
If you do socket.setdefaulttimeout(X) before trying to
instantiate imaplib.IMAP4_SSL(), the connection hangs
partway through the SSL negotiation.

The cause is that socket.ssl() is actually incompatible
with timeouts (not sure why) and IMAP4_SSL() doesn't do
anything to guard against it.  It should do
.setblocking(1) on the socket.socket object before
passing it to socket.ssl().

The documentation should also clarify timeouts not
working with socket.ssl.


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

>Comment By: Brett Cannon (bcannon)
Date: 2004-07-10 14:29

Message:
Logged In: YES 
user_id=357491

Patch #945642 seems to fix this.  Closing as fixed.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977680&group_id=5470


More information about the Python-bugs-list mailing list