bitly/pynsq — pull request #14 by mreiferson (2013-04-02 23:56:07+00:00)
Title: orphaned connections when not using lookupd

If you specify more than one task method to your `Reader` instance and specify `nsqd_tcp_addresses` (bypassing `nsqlookupd`, like in cases where you want to silo connections locally) each task method creates its own channel (and therefore connection) to those `nsqd` nodes.

The intended behavior when bypassing `nsqlookupd` and the client is disconnected from an `nsqd` is that the IOLoop would close and the reader would exit (a "fail fast" philosophy).

The problem is that when you specify more than one `nsqd` (or just specify more than one task method which effectively opens more than one connection) the logic fails and you orphan that disconnected case.

We should instead adopt auto-reconnection for the non-lookup case.

cc @jehiah