Define a timeout for all http requests

This commit is contained in:
Némunaire 2012-07-27 18:18:13 +02:00
commit a2b273d09b
13 changed files with 12 additions and 12 deletions

View file

@ -38,7 +38,7 @@ def parselisten (msg):
if res is not None:
#print ("seen : %s"%res.group(1))
URLS[res.group(1)] = msg
conn = http.client.HTTPConnection("musik.p0m.fr")
conn = http.client.HTTPConnection("musik.p0m.fr", timeout=10)
conn.request("GET", "/?nemubot&a=add&url=%s"%(res.group (1)))
conn.getresponse()
conn.close()