Using httplib2
, I am sending multiple requests with gevent
, after some time http.request()
method of httplib2
is getting blocked forever.
On checking I found that blocking function is socket.getaddrinfo()
in httplib2 link.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
set default timeout using socket.setdefaulttimeout()
. since timeout of getaddrinfo is not specified it will use default timeout.