Skip to content

Commit

Permalink
SSL fix for non-blocking reads
Browse files Browse the repository at this point in the history
  • Loading branch information
wjps committed Apr 14, 2015
1 parent 7d457f5 commit 635957f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pika/adapters/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ def _handle_read(self):
except socket.timeout:
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 socket.error as error:
if error.errno in (errno.EAGAIN, errno.EWOULDBLOCK):
Expand Down

0 comments on commit 635957f

Please sign in to comment.