File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1161,7 +1161,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1161
1161
to_read = bufsize - recv_len
1162
1162
if to_read < 0 :
1163
1163
raise MMQTTException (f"negative number of bytes to read: { to_read } " )
1164
- read_timeout = self .keep_alive
1164
+ read_timeout = self ._recv_timeout
1165
1165
mv = mv [recv_len :]
1166
1166
while to_read > 0 :
1167
1167
recv_len = self ._sock .recv_into (mv , to_read )
@@ -1172,7 +1172,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1172
1172
f"Unable to receive { to_read } bytes within { read_timeout } seconds."
1173
1173
)
1174
1174
else : # ESP32SPI Impl.
1175
- # This will timeout with socket timeout (not keepalive timeout)
1175
+ # This will time out with socket timeout (not receive timeout).
1176
1176
rc = self ._sock .recv (bufsize )
1177
1177
if not rc :
1178
1178
self .logger .debug ("_sock_exact_recv timeout" )
@@ -1182,7 +1182,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1182
1182
# or raise exception if wait longer than read_timeout
1183
1183
to_read = bufsize - len (rc )
1184
1184
assert to_read >= 0
1185
- read_timeout = self .keep_alive
1185
+ read_timeout = self ._recv_timeout
1186
1186
while to_read > 0 :
1187
1187
recv = self ._sock .recv (to_read )
1188
1188
to_read -= len (recv )
You can’t perform that action at this time.
0 commit comments