lpgauth/cassanderl — pull request #18 by ferd (2012-12-03 19:32:15+00:00)
Title: Fixing app shutdown and socket leak

It was impossible to shut down the application and then start it without taking dispcount down first (as per issue #17) -- this has been fixed.

There was also the potential for a socket leak. Thrift client connections are a TCP socket that would be ckeched in when a request is done. However, whenever the consumer died unexpectedly, the socket would not be closed through garbage collection, either due to some linking race condition (similar to http://comments.gmane.org/gmane.comp.lang.erlang.bugs/3144) or unclear socket ownership between different components. The second commit of this pull req fixes this issue by forcing a thrift client close call whenever the consumer dies or is seen as dead by the consumer checking it in.