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 @@ -1115,7 +1115,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1115
1115
to_read = bufsize - recv_len
1116
1116
if to_read < 0 :
1117
1117
raise MMQTTException (f"negative number of bytes to read: { to_read } " )
1118
- read_timeout = self .keep_alive
1118
+ read_timeout = self ._recv_timeout
1119
1119
mv = mv [recv_len :]
1120
1120
while to_read > 0 :
1121
1121
recv_len = self ._sock .recv_into (mv , to_read )
@@ -1126,7 +1126,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1126
1126
f"Unable to receive { to_read } bytes within { read_timeout } seconds."
1127
1127
)
1128
1128
else : # ESP32SPI Impl.
1129
- # This will timeout with socket timeout (not keepalive timeout)
1129
+ # This will time out with socket timeout (not receive timeout).
1130
1130
rc = self ._sock .recv (bufsize )
1131
1131
if not rc :
1132
1132
self .logger .debug ("_sock_exact_recv timeout" )
@@ -1136,7 +1136,7 @@ def _sock_exact_recv(self, bufsize: int) -> bytearray:
1136
1136
# or raise exception if wait longer than read_timeout
1137
1137
to_read = bufsize - len (rc )
1138
1138
assert to_read >= 0
1139
- read_timeout = self .keep_alive
1139
+ read_timeout = self ._recv_timeout
1140
1140
while to_read > 0 :
1141
1141
recv = self ._sock .recv (to_read )
1142
1142
to_read -= len (recv )
You can’t perform that action at this time.
0 commit comments