• Michael Grunder's avatar
    Fix protocol error (#1106) · 79ae5ffc
    Michael Grunder authored
    
    
    Fix ProtocolError
    
    This commit attempts to fix hiredis such that a recoverable write error
    will be retried rather than throwing a hard error.
    
    Since our read/write functions are now behind function pointers, we
    specify semantically that a return value of < 0 is a hard error, 0 a
    recoverable error, and > 0 a success.
    
    Our default `redisNetRead` function was already doing something similar
    so this also improves code consistency.
    
    Resolves #961
    Co-authored-by: default avatarMaksim Tuleika <maksim.tuleika@appcast.io>
    79ae5ffc
hiredis.c 35.9 KB