pycurl.TIMEOUT_MS not work when the value <= 999

Bug #1176944 reported by Jifeng Yin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pycurl (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

At first, I'm sorry if this is not a bug or here is not the right place to report...

===========Code Sample=============
import time
import pycurl

c = pycurl.Curl()
c.setopt(pycurl.URL, 'http://baidu.com/')
start = time.time()
c.setopt(pycurl.TIMEOUT_MS, 999)
try:
    c.perform()
except:
    print "Timeout"
finally:
    print time.time() - start

c = pycurl.Curl()
c.setopt(pycurl.URL, 'http://baidu.com/')
c.setopt(pycurl.TIMEOUT_MS, 999)
c.setopt(pycurl.NOSIGNAL, 1)
c.perform()
print "set NOSIGNAL makes it work"

============OutPut==============
Timeout
0.0002281665802
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
set NOSIGNAL makes it work

=============================
system: quantal
python-pycurl version: 7.19.0-5ubuntu1

Revision history for this message
Barry Warsaw (barry) wrote :

I just tested this with pycurl 7.19.5 (hopefully soon uploaded to Utopic). It seems to work for me. For example, if I bump the timeout down to 100ms (since baidu comes back quicker than 999ms for me), I see the timeout regardless of whether NOSIGNAL is set or not. So I guess this is fixed in newer versions of pycurl.

Changed in pycurl (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pycurl (Ubuntu) because there has been no activity for 60 days.]

Changed in pycurl (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.