Open saurabh-hirani opened 5 years ago
As python3 uses recv_into and it is not patched by current gevent_openssl, a grequests call with pyopenssl installed falls back to https://github.com/urllib3/urllib3/blob/1e9ab5aee042ff0158d0f443bc600ef3a2e7bf9a/src/urllib3/contrib/pyopenssl.py#L302 making the code slow.
recv_into
This issue is explained in depth at:
However, to keep the focus on the current patch, this issue can be replicated by following these steps:
pip3 install gevent-openssl
https://localhost:8082/delay/1
pip3 uninstall gevent-openssl
As python3 uses
recv_into
and it is not patched by current gevent_openssl, a grequests call with pyopenssl installed falls back to https://github.com/urllib3/urllib3/blob/1e9ab5aee042ff0158d0f443bc600ef3a2e7bf9a/src/urllib3/contrib/pyopenssl.py#L302 making the code slow.This issue is explained in depth at:
However, to keep the focus on the current patch, this issue can be replicated by following these steps:
pip3 install gevent-openssl
https://localhost:8082/delay/1
to introduce a 1 second delay in response.pip3 uninstall gevent-openssl