Skip to content

reader: not able to stop a reader when no nsqlookupd address set #196

@shuoli84

Description

@shuoli84

The reader's close method will call on_connection_closed, and if nsqlookupd address not set, it will try to reconnect to nsqd after 15 seconds, which means the reader can't be closed in this case?

        # in _on_connection_close()

        if not self.lookupd_http_addresses:
            # automatically reconnect to nsqd addresses when not using lookupd
            logger.info('[%s:%s] attempting to reconnect in 15s', conn.id, self.name)
            reconnect_callback = functools.partial(self.connect_to_nsqd,
                                                   host=conn.host, port=conn.port)
            self.io_loop.add_timeout(time.time() + 15, reconnect_callback)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions