[ python-Bugs-1001018 ] setdefaulttimeout causes unnecessary
timeouts on connect err
SourceForge.net
noreply at sourceforge.net
Sat Jul 31 03:07:17 CEST 2004
Bugs item #1001018, was opened at 2004-07-31 11:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1001018&group_id=5470
Category: Windows
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Hammond (mhammond)
Assigned to: Nobody/Anonymous (nobody)
Summary: setdefaulttimeout causes unnecessary timeouts on connect err
Initial Comment:
This looks like a bug to me:
>>> import socket, httplib
>>> socket.setdefaulttimeout(10)
>>> httplib.HTTPConnection("www.python.org",
9999).connect()
[.... 10 second delay ....]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "e:\src\python-cvs\lib\httplib.py", line 548, in
connect
raise socket.error, msg
socket.timeout: timed out
>>>
On Linux, there is no significant delay, and the
traceback reads:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/httplib.py", line 548,
in connect
raise socket.error, msg
socket.error: (111, 'Connection refused')
The linux result is what I expected on Windows.
Sockets aren't my strong point, so I'd prefer someone
confirming it is a real bug before I burn too much time
on it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1001018&group_id=5470
More information about the Python-bugs-list
mailing list