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(
10681068 to_read = bufsize - recv_len
10691069 if to_read < 0 :
10701070 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
10721072 mv = mv [recv_len :]
10731073 while to_read > 0 :
10741074 recv_len = self ._sock .recv_into (mv , to_read )
@@ -1079,7 +1079,7 @@ def _sock_exact_recv(
10791079 f"Unable to receive { to_read } bytes within { read_timeout } seconds."
10801080 )
10811081 else : # ESP32SPI Impl.
1082- # This will timeout with socket timeout (not keepalive timeout)
1082+ # This will time out with socket timeout (not receive timeout).
10831083 rc = self ._sock .recv (bufsize )
10841084 if not rc :
10851085 self .logger .debug ("_sock_exact_recv timeout" )
@@ -1089,7 +1089,7 @@ def _sock_exact_recv(
10891089 # or raise exception if wait longer than read_timeout
10901090 to_read = bufsize - len (rc )
10911091 assert to_read >= 0
1092- read_timeout = self .keep_alive
1092+ read_timeout = self ._recv_timeout
10931093 while to_read > 0 :
10941094 recv = self ._sock .recv (to_read )
10951095 to_read -= len (recv )
You can’t perform that action at this time.
0 commit comments