coopernurse/node-pool — pull request #34 by mcavage (2012-04-24 23:12:59+00:00)
Title: Remove client from availbleObjects on destroy(client)

Hi,

As related to #31, I am trying to kill clients when an `.on('error')` hook is invoked. If `destroy()` is called outside of the `acquire()` block (i.e., my client gets a TCP RST during some idle window) then `destroy()` is not sufficient to clean up, as the borked client will still be sitting in `availableObjects`. This fix simply rewrites that list without the client in question.

Feel free to suggest better ways of doing this - I really just need the functionality, and it's your code, so I can change this to look like whatever you want.

Thanks!
~Mark