Skip to content

Commit 6f3d99f

Browse files
authored
Change limit to 0 if nbytes is None
1 parent adacbb1 commit 6f3d99f

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
@@ -172,7 +172,7 @@ def recv_into(self, buffer, nbytes=None):
172172

173173
stamp = time.monotonic()
174174
to_read = len(buffer)
175-
limit = to_read if nbytes is None else to_read - nbytes
175+
limit = 0 if nbytes is None else to_read - nbytes
176176
received = []
177177
while to_read > limit:
178178
# print("Bytes to read:", to_read)

0 commit comments

Comments
 (0)