public function close() : Promised
    {
        return
            ($this->pool
                ? $this->pool->shutdown()
                : (
                    $this->session
                        ? $this->session->close()
                        : Promise::resolved()
                )
            )->sync($this->closed())
        ;
    }