Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyopenssl: wait for data before handshake retry
Affects requests made to SSL servers running in the same thread via green threads. http://stackoverflow.com/questions/19109436/gevent-ssl-wsgiserver-blocks-when-it-shouldnt
- Loading branch information
a49bec5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
select.select()
does not work ifsock
's underlyingfd >= 1024
[0], would you mind switching toselect.poll
[1] here? Or maybe usingpoll
when it's available and falling back toselect
and catchingValueError
exception?[0]
ValueError: filedescriptor out of range in select()
[1] It's been part of SuSv2/POSIX.1-2001 for quite a while, so it should be safe to assume that it's supported by most UNIXes and Windows Vista+: http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.html
a49bec5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're going to have to do something like this: https://github.com/shazow/urllib3/blob/master/urllib3/util/connection.py#L12
a49bec5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SaveTheRbtz Could you open an issue please with these details?
a49bec5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done: #589