Skip to content

Commit

Permalink
Merge pull request #580 from wjps/remove-ssl-want-read
Browse files Browse the repository at this point in the history
SSLWantRead is not supported before python 2.7.9 and 3.3
  • Loading branch information
gmr committed May 19, 2015
2 parents 072ba73 + 3125c79 commit 433e5e4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pika/adapters/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,13 @@ def _handle_read(self):
self._handle_timeout()
return 0

except ssl.SSLWantReadError:
# ssl wants more data but there is nothing currently
# available in the socket, wait for it to become readable.
return 0

except ssl.SSLError as error:
if error.args[0] == ssl.SSL_ERROR_WANT_READ:
# ssl wants more data but there is nothing currently
# available in the socket, wait for it to become readable.
return 0
return self._handle_error(error)

except socket.error as error:
if error.errno in (errno.EAGAIN, errno.EWOULDBLOCK):
return 0
Expand Down

0 comments on commit 433e5e4

Please sign in to comment.