We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c334c81 commit f0fd465Copy full SHA for f0fd465
1 file changed
adafruit_minimqtt/adafruit_minimqtt.py
@@ -963,15 +963,15 @@ def _sock_exact_recv(self, bufsize):
963
# CPython/Socketpool Impl.
964
rc = bytearray(bufsize)
965
mv = memoryview(rc)
966
- recv = self._sock.recv_into(rc, bufsize)
967
- to_read = bufsize - recv
+ recv_len = self._sock.recv_into(rc, bufsize)
+ to_read = bufsize - recv_len
968
assert to_read >= 0
969
read_timeout = self.keep_alive
970
- mv = mv[recv:]
+ mv = mv[recv_len:]
971
while to_read > 0:
972
- recv = self._sock.recv_into(mv, to_read)
973
- to_read -= recv
974
+ recv_len = self._sock.recv_into(mv, to_read)
+ to_read -= recv_len
975
if time.monotonic() - stamp > read_timeout:
976
raise MMQTTException(
977
"Unable to receive {} bytes within {} seconds.".format(
0 commit comments