celery/kombu — pull request #287 by idealopamp (2013-12-11 18:46:39+00:00)
Title: Go back to the way the code was originally structured, but with a differ...

...ent parse_response signature for LISTEN operations.

After realizing that subclient and client are two different instances of two different pyredis classes, I realized that the fix might be simpler than I had originally suggested. I think the real problem was that we were calling `client.parse_response` (wrong) with 1 arg (also wrong), when we should have been calling `subclient.parse_response` with 0 args (not two). (You can see the signature difference between the two at https://github.com/andymccurdy/redis-py/search?q=def+parse_response&ref=cmdform )

I believe the AttributeError/null socket was actually occurring after my original fix because it was calling client.parse_response instead of subclient.parse_response.

With the current version of the fix, the issue that I used to see is now raised as a ConnectionError. However, since the original version of master was catching connection errors, I put the catch for this back in, and updated the unit tests accordingly. I also added a warning when such errors are caught, which upstream may want to remove if it's a performance risk, although it did prove useful for us to find the cause of the ConnectionError.