Skip to content

Commit

Permalink
Fixed not check data length read from socket (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden0z authored and eandersson committed Oct 22, 2021
1 parent 3abf0ee commit b849b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions amqpstorm/io.py
Expand Up @@ -270,6 +270,8 @@ def _receive(self):
data_in = EMPTY_BUFFER
try:
data_in = self._read_from_socket()
if len(data_in) == 0:
raise socket.error("connection closed by server")
except socket.timeout:
pass
except compatibility.SSLWantReadError:
Expand Down

0 comments on commit b849b43

Please sign in to comment.