datastax/nodejs-driver — pull request #20 by connor4312 (2014-12-24 22:06:03+00:00)
Title: Reset shuttingDown state after pool closes

Previously, after `.shutdown(callback)` was called on a client, subsequent calls to shutdown did nothing, and callbacks were never fired because we return in line 197.

I encountered this issue (and solved it with this fix) when unit testing where connections were torn down and reestablished several times throughout the test suites: it caused tests which waited for the client to be shut down to time out.