mranney/node_redis — pull request #360 by tleach (2012-12-31 20:04:01+00:00)
Title: Don't pop the command queue when PubSub messages are received

I debugged this issue just before discovering @cxreg had independently logged this issue in #342 and submitted pull request #356 to fix it.

@cxreg's fix looks good, however I decided to submit this separate pull request for two reasons:

1. @cxreg's fix seems to break a couple of tests (the extra checks to ensure the `reply` array contains at least one non-null item seem to be necessary to make them pass).

2. I wrote a couple of extra unit tests to reproduce the issue and prove the fix addresses it. This adds a little more value.