dustismo/TrendrrNSQClient — pull request #8 by kenshiro-o (2014-02-18 10:14:38+00:00)
Title: HttpURLConnection mem leak and unclosed file descriptors fix

The HttpURLConnection object is leaking memory and not properly closing file descriptors whenever we look up hosts for a given topic.

This is exacerbated by the fact that if the no hosts can be found for a given topic, the NSQLookupDynMapImpl will keep trying to find the publishing hosts at regular intervals, thereby instantiating new HttpURLConnection objects which never release file descriptors and memory. We need release resources by calling disconnect().

This fix address the major issue discussed above.

Cheers,
Ed.