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 @@ -1068,7 +1068,7 @@ def _sock_exact_recv(
1068
1068
to_read = bufsize - recv_len
1069
1069
if to_read < 0 :
1070
1070
raise MMQTTException (f"negative number of bytes to read: { to_read } " )
1071
- read_timeout = timeout if timeout is not None else self .keep_alive
1071
+ read_timeout = timeout if timeout is not None else self ._recv_timeout
1072
1072
mv = mv [recv_len :]
1073
1073
while to_read > 0 :
1074
1074
recv_len = self ._sock .recv_into (mv , to_read )
@@ -1079,7 +1079,7 @@ def _sock_exact_recv(
1079
1079
f"Unable to receive { to_read } bytes within { read_timeout } seconds."
1080
1080
)
1081
1081
else : # ESP32SPI Impl.
1082
- # This will timeout with socket timeout (not keepalive timeout)
1082
+ # This will time out with socket timeout (not receive timeout).
1083
1083
rc = self ._sock .recv (bufsize )
1084
1084
if not rc :
1085
1085
self .logger .debug ("_sock_exact_recv timeout" )
@@ -1089,7 +1089,7 @@ def _sock_exact_recv(
1089
1089
# or raise exception if wait longer than read_timeout
1090
1090
to_read = bufsize - len (rc )
1091
1091
assert to_read >= 0
1092
- read_timeout = self .keep_alive
1092
+ read_timeout = self ._recv_timeout
1093
1093
while to_read > 0 :
1094
1094
recv = self ._sock .recv (to_read )
1095
1095
to_read -= len (recv )
You can’t perform that action at this time.
0 commit comments