[ python-Bugs-1353269 ] poplib.POP3_SSL() class incompatible with socket.timeout
SourceForge.net
noreply at sourceforge.net
Thu Dec 15 00:31:44 CET 2005
Bugs item #1353269, was opened at 2005-11-10 17:34
Message generated for change (Comment added) made by arekm
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1353269&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Charles (melicertes)
Assigned to: Nobody/Anonymous (nobody)
Summary: poplib.POP3_SSL() class incompatible with socket.timeout
Initial Comment:
If you call socket.setdefaulttimeout() to enable
timeout mode, then create a POP3-over-SSL connection by
instantiating a poplib.POP3_SSL() object, the resulting
connection can hang because the underlying socket.ssl()
object doesn't work when timeouts are enabled.
If, after creating the POP3_SSL object, you call
object.conn.sock.setblocking(1), the hangs will not happen.
This is exactly the same bug as happened with IMAP SSL
connections, as I reported in bug #977680.
The Python documentation still does not mention that
socket SSL support is not compatible with socket
timeout support.
----------------------------------------------------------------------
Comment By: Arkadiusz Miskiewicz (arekm)
Date: 2005-12-15 00:31
Message:
Logged In: YES
user_id=139606
btw. please test this patch: https://sourceforge.net/tracker
/index.php?func=detail&aid=1380952&group_id=5470&atid=305470
----------------------------------------------------------------------
Comment By: Arkadiusz Miskiewicz (arekm)
Date: 2005-12-14 23:59
Message:
Logged In: YES
user_id=139606
It's just broken in _ssl.c.
In PySSL_SSLread() there is:
sockstate = check_socket_and_wait_for_timeout(self->Socket,
0);
It hangs here because that function waits for new data on
the socket but SSL layer could already read that data.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1353269&group_id=5470
More information about the Python-bugs-list
mailing list