Skip to content

Commit 1d8f81c

Browse files
committed
Time out after 30 seconds iwhen downloading
- Legacy-Id: 1903
1 parent 00eae6a commit 1d8f81c

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/idrfc/mirror_draft_versions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def log(line):
5858
log("url: "+URL)
5959

6060
log("downloading...")
61+
socket.setdefaulttimeout(30)
6162
response = urllib2.urlopen(URL)
6263
#log("got \n"+str(response.info()))
6364
log("parsing...")

ietf/idrfc/mirror_rfc_editor_queue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def insert_into_database(drafts, refs):
199199
log("url: "+QUEUE_URL)
200200

201201
log("downloading...")
202+
socket.setdefaulttimeout(30)
202203
response = urllib2.urlopen(QUEUE_URL)
203204

204205
(drafts, refs) = parse_all(response)

ietf/idrfc/mirror_rfc_index.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def insert_to_database(data):
146146
log("url: "+INDEX_URL)
147147

148148
log("downloading...")
149+
socket.setdefaulttimeout(30)
149150
response = urllib2.urlopen(INDEX_URL)
150151
log("parsing...")
151152
data = parse(response)

0 commit comments

Comments
 (0)