public function isConnected(): bool
    {
        if ($this->engine) {
            $connected = $this->engine->isConnected();
            if (!$connected) {
                $this->engine = null;
            }

            return $connected;
        }

        return false;
    }