Skip to content

Commit

Permalink
Fixed long comment lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlizotte-uwo committed Feb 13, 2021
1 parent 1c0f6c8 commit 9791e9d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,12 +909,16 @@ def _sock_exact_recv(self, bufsize):
else: # ESP32SPI Impl.
stamp = time.monotonic()
read_timeout = self.keep_alive
rc = self._sock.recv(bufsize) # This will timeout with socket timeout (not keepalive timeout)
# This will timeout with socket timeout (not keepalive timeout)
rc = self._sock.recv(bufsize)
if(not rc):
if self.logger:
self.logger.debug("_sock_exact_recv timeout")
raise OSError(errno.ETIMEDOUT) # If no bytes waiting, raise same exception as socketpool
to_read = bufsize - len(rc) # If any bytes waiting, try to read them all
# If no bytes waiting, raise same exception as socketpool
raise OSError(errno.ETIMEDOUT)
# If any bytes waiting, try to read them all,
# or raise exception if wait longer than read_timeout
to_read = bufsize - len(rc)
assert to_read >= 0
read_timeout = self.keep_alive
while to_read > 0:
Expand Down

0 comments on commit 9791e9d

Please sign in to comment.