nrk/predis — pull request #164 by willybarro (2014-05-10 17:43:54+00:00)
Title: Recover from server disconnection by timeout

If Redis Server has a connection timeout set, a Predis client using the stream adapter may be left with a useless (closed) resource when Redis drops the conection per timeout.
When that happens, the user receives a Predis\Connection\ConnectionException "Error while reading line from the server.", but that one is not recoverable from outside the lib, as the connect method will return the closed resource.

More details on this patch and why it was implemented that way can be found on commit messages.

When I've set the timeout to "1" on my server, other tests started failing (see below) and are also fixed by this patch.

**Tests failing with timeout set to "1" (All of them now pass!):**
Predis\Command\KeyExpireAtTest::testCanExpireKeys
Predis\Command\KeyExpireTest::testCanExpireKeys
Predis\Command\KeyExpireTest::testConsistencyWithTTL
Predis\Command\KeyPreciseExpireAtTest::testCanExpireKeys
Predis\Command\StringSetExpireTest::testKeyExpiresAfterTTL