Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用httplib2,我正在发送多个请求gevent,经过一段时间http.request()的方法httplib2被永久阻止。 在检查时我发现阻塞功能socket.getaddrinfo()在 httplib2链接中。
httplib2
gevent
http.request()
socket.getaddrinfo()
使用设置默认超时socket.setdefaulttimeout()。由于未指定 getaddrinfo 的超时,它将使用默认超时。
socket.setdefaulttimeout()