We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cac3b41 commit b47ed70Copy full SHA for b47ed70
adafruit_minimqtt/adafruit_minimqtt.py
@@ -473,7 +473,11 @@ def _send_bytes(
473
view = memoryview(buffer)
474
while bytes_sent < bytes_to_send:
475
try:
476
- bytes_sent += self._sock.send(view[bytes_sent:])
+ sent_now = self._sock.send(view[bytes_sent:])
477
+ # Some versions of `Socket.send()` do not return the number of bytes sent.
478
+ if not isinstance(sent_now, int):
479
+ return
480
+ bytes_sent += sent_now
481
except OSError as exc:
482
if exc.errno == errno.EAGAIN:
483
continue
0 commit comments