Define a timeout for all http requests
This commit is contained in:
parent
6d26a13752
commit
a2b273d09b
13 changed files with 12 additions and 12 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue