Skip to content

Commit bf54a08

Browse files
ZachNocpforbes
andauthored
Update adafruit_esp32spi/adafruit_esp32spi_socket.py
Co-Authored-By: Craig <cpforbes@starlake.org>
1 parent 79425a6 commit bf54a08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_esp32spi/adafruit_esp32spi_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def readline(self):
9191
avail = min(_the_interface.socket_available(self._socknum), MAX_PACKET)
9292
if avail:
9393
self._buffer += _the_interface.socket_read(self._socknum, avail)
94-
elif time.monotonic() - stamp > self._timeout:
94+
elif self._timeout > 0 and time.monotonic() - stamp > self._timeout:
9595
self.close() # Make sure to close socket so that we don't exhaust sockets.
9696
raise RuntimeError("Didn't receive full response, failing out")
9797
firstline, self._buffer = self._buffer.split(b'\r\n', 1)

0 commit comments

Comments
 (0)