This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IMAP4_SSL() class incompatible with socket.timeout
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, melicertes
Priority: normal Keywords:

Created on 2004-06-22 18:13 by melicertes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg21245 - (view) Author: Charles (melicertes) Date: 2004-06-22 18:13
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.
msg21246 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-10 21:29
Logged In: YES 
user_id=357491

Patch #945642 seems to fix this.  Closing as fixed.
History
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40435
2004-06-22 18:13:40melicertescreate