From c2bd802849a576ec20b84e738bae638a8078900c Mon Sep 17 00:00:00 2001 From: wh Date: Wed, 23 Apr 2014 17:04:35 +0800 Subject: [PATCH] update fetch img timeout --- twqq/hub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twqq/hub.py b/twqq/hub.py index 44eff25..28be186 100644 --- a/twqq/hub.py +++ b/twqq/hub.py @@ -181,8 +181,8 @@ def generate_curl(self, url=None, headers=None): curl.setopt(pycurl.WRITEFUNCTION, buff.write) curl.setopt(pycurl.FOLLOWLOCATION, 1) curl.setopt(pycurl.MAXREDIRS, 5) - curl.setopt(pycurl.TIMEOUT, 1) - curl.setopt(pycurl.CONNECTTIMEOUT, 1) + curl.setopt(pycurl.TIMEOUT, 3) + curl.setopt(pycurl.CONNECTTIMEOUT, 3) if url: curl.setopt(pycurl.URL, url)