Skip to content

Commit

Permalink
Added return if binary response cannot be decompressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollie-Hooper committed Apr 8, 2021
1 parent f1116df commit a050ca1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions binance/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def onMessage(self, payload, isBinary):
payload = gzip.decompress(payload)
except:
print('Could not interpret binary response payload')
return

try:
payload_obj = json.loads(payload.decode('utf8'))
Expand Down

0 comments on commit a050ca1

Please sign in to comment.