public function connectToNSQLookupd($addr)
    {
        if ($this->isStopped) {
            throw new NsqException("consumer stopped");
        }

        $addr = $this->formatAddress($addr);
        if (isset($this->lookupdHTTPAddrs[$addr])) {
            return;
        }

        $this->lookupdHTTPAddrs[$addr] = [];
        yield $this->queryLookupd($addr);

        if (count($this->lookupdHTTPAddrs) === 1) {
            // reconnecting will be triggered on connection close,
            // so no need to check number of connections in tick timer
            $this->lookupdPollingTick();
        }
    }