code: private function checkConnection($start): bool
      {
          if (! $this->ready()) {
              if (time() - $start > $this->timeout) {
                  $this->disconnect();
                  throw new HttpException("Connection timed out!");
              }
              
              return false;
          }
          
          return true;
      }
docs: Check the connection availability
  
  @param int $start
  Timestamp when read request attempt starts
  @throws HttpException
  @return bool