Skip to content

Commit 9791e9d

Browse files
committed
Fixed long comment lines.
1 parent 1c0f6c8 commit 9791e9d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -909,12 +909,16 @@ def _sock_exact_recv(self, bufsize):
909909
else: # ESP32SPI Impl.
910910
stamp = time.monotonic()
911911
read_timeout = self.keep_alive
912-
rc = self._sock.recv(bufsize) # This will timeout with socket timeout (not keepalive timeout)
912+
# This will timeout with socket timeout (not keepalive timeout)
913+
rc = self._sock.recv(bufsize)
913914
if(not rc):
914915
if self.logger:
915916
self.logger.debug("_sock_exact_recv timeout")
916-
raise OSError(errno.ETIMEDOUT) # If no bytes waiting, raise same exception as socketpool
917-
to_read = bufsize - len(rc) # If any bytes waiting, try to read them all
917+
# If no bytes waiting, raise same exception as socketpool
918+
raise OSError(errno.ETIMEDOUT)
919+
# If any bytes waiting, try to read them all,
920+
# or raise exception if wait longer than read_timeout
921+
to_read = bufsize - len(rc)
918922
assert to_read >= 0
919923
read_timeout = self.keep_alive
920924
while to_read > 0:

0 commit comments

Comments
 (0)