Giampaolo Rodola' <gnewsg at gmail.com> wrote: > In the meanwhile I noticed something in the ssl.py code which seems to > be wrong: > > def recv (self, buflen=1024, flags=0): > if self._sslobj: > if flags != 0: > raise ValueError( > "non-zero flags not allowed in calls to sendall() > on %s" % > self.__class__) > while True: > try: > return self.read(buflen) > except SSLError, x: > if x.args[0] == SSL_ERROR_WANT_READ: > continue > else: > raise x > else: > return socket.recv(self, buflen, flags) > > I don't know the low levels but that while statement which continues > in case of SSL_ERROR_WANT_READ seems to be wrong (blocking), at least > when dealing with non-blocking sockets. I think the proper way of > doing recv() here is letting SSL_ERROR_WANT_READ propagate and let the > upper application (e.g. asyncore) deal with it. It's an interesting point. I'm not sure the underlying code will ever raise this exception. Please file a bug report to help us track this. Thanks. Bill
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4