colinmollenhour/credis — pull request #11 by xanido (2013-10-24 05:06:33+00:00)
Title: Allow setReadTimeout to accept -1 (for PHPRedis)

The `setReadTimeout` method doesn't accept values less than 0, but the PHPRedis `Redis::OPT_READ_TIMEOUT` option does seem to accept -1. PHPRedis treats -1 as no timeout, whereas it treats 0 as timeout immediately. The discrepancy is mentioned [in this Stack Overflow thread](http://stackoverflow.com/questions/18072407/php-redis-timeout-read-error-on-connection).

I'm not sure whether it would be better to check if Credis is in standalone mode first, and only accept -1 if not.