You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gevent monkey patching on socket for some reason (have yet to find out why) does not properly raise a SocketTimeout the way it should and as a consequence urllib3 will not raise a Timeout properly if you're using gevent.
How to reproduce:
Create unresponsive socket (simulate timeout)
nc -l 8080
from gevent.monkey import patch_all
patch_all()
import urllib3
http = urllib3.PoolManager()
r = http.request('GET', 'http://localhost:8080/',timeout=1)
The Timeout is never raised.
One solution is to use gevent.socket when making the connection, that should properly raise a SocketTimeout.
The text was updated successfully, but these errors were encountered:
The gevent monkey patching on
socket
for some reason (have yet to find out why) does not properly raise a SocketTimeout the way it should and as a consequenceurllib3
will not raise a Timeout properly if you're using gevent.How to reproduce:
Create unresponsive socket (simulate timeout)
The Timeout is never raised.
One solution is to use
gevent.socket
when making the connection, that should properly raise a SocketTimeout.The text was updated successfully, but these errors were encountered: