[ python-Bugs-1001018 ] setdefaulttimeout causes unnecessary
timeouts on connect err
SourceForge.net
noreply at sourceforge.net
Mon Aug 2 01:38:42 CEST 2004
Bugs item #1001018, was opened at 2004-07-31 11:07
Message generated for change (Comment added) made by mhammond
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: Guido van Rossum (gvanrossum)
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.
----------------------------------------------------------------------
>Comment By: Mark Hammond (mhammond)
Date: 2004-08-02 09:38
Message:
Logged In: YES
user_id=14198
Guido - it looks like this change was made by you in Rev
1.257. Can you please confirm the new behaviour is not
correct and I will try and dig a little deeper.
----------------------------------------------------------------------
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