Fix potential connection error #7

Merged
merged 1 commit into from Apr 2, 2013
Commits on Apr 2, 2013
  1. Fix potential connection error

    ferd committed 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.