File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -909,12 +909,16 @@ def _sock_exact_recv(self, bufsize):
909909 else : # ESP32SPI Impl.
910910 stamp = time .monotonic ()
911911 read_timeout = self .keep_alive
912- rc = self ._sock .recv (bufsize ) # This will timeout with socket timeout (not keepalive timeout)
912+ # This will timeout with socket timeout (not keepalive timeout)
913+ rc = self ._sock .recv (bufsize )
913914 if (not rc ):
914915 if self .logger :
915916 self .logger .debug ("_sock_exact_recv timeout" )
916- raise OSError (errno .ETIMEDOUT ) # If no bytes waiting, raise same exception as socketpool
917- to_read = bufsize - len (rc ) # If any bytes waiting, try to read them all
917+ # If no bytes waiting, raise same exception as socketpool
918+ raise OSError (errno .ETIMEDOUT )
919+ # If any bytes waiting, try to read them all,
920+ # or raise exception if wait longer than read_timeout
921+ to_read = bufsize - len (rc )
918922 assert to_read >= 0
919923 read_timeout = self .keep_alive
920924 while to_read > 0 :
You can’t perform that action at this time.
0 commit comments