Steffen Ullrich added the comment:
> What's the point of checking? Just call SSL_read() and catch the
> SSL_ERROR_WANT_{READ,WRITE} to determine that no data is available; as a
> bonus it also tells you whether you have to select() for read or for write.
A common scenario with non-blocking sockets is to have lots of sockets at the
same time and a central select loop. And whenever a socket gets ready it
usually reads only as much as is needed for its current task and then returns
to the select-loop.
I was trying to point out that for SSL enabled sockets this approach will no
longer work and might cause odd stalling of connections, because select will
not show the socket as readable although data are there for read. I don't think
it is enough to just document pending, but it should be documented that the
behavior with SSL sockets with select differs from the behavior one is used
from normal TCP sockets.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com