Fix potential connection error #7

Merged
merged 1 commit into from Apr 2, 2013

Conversation

Projects
None yet
2 participants

ferd commented Apr 2, 2013

if the value received when connecting is {ok, ...} where the pattern
doesn't match, the one expected and other packets are received, the
result returned there will not be discarded -- it will be taken as the
new state and all future calls will fall through the blank match
patterns

So if the connection or auth fails (say it tries to reconnect during
some password change), no event will ever happen and as long as redis
doesn't kill the connection things will keep going on. But we won't
necessarily know the connection has been killed because all events will
be auto-ignored.

Fix potential connection error
if the value received when connecting is {ok, ...} where the pattern
doesn't match, the one expected and other packets are received, the
result returned there will not be discarded -- it will be taken as the
new state and all future calls will fall through the blank match
patterns

So if the connection or auth fails (say it tries to reconnect during
some password change), no event will ever happen and as long as redis
doesn't kill the connection things will keep going on. But we won't
necessarily know the connection has been killed because all events will
be auto-ignored.

jkvor added a commit that referenced this pull request Apr 2, 2013

Merge pull request #7 from ferd/lance-bass
Fix potential connection error

@jkvor jkvor merged commit 84ebe67 into jkvor:redis-2.6-compat Apr 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment