• Yossi Gottlieb's avatar
    Fix occasional hangs on replication reconnection. (#7830) · 9d0388a0
    Yossi Gottlieb authored
    This happens only on diskless replicas when attempting to reconnect after 
    failing to load an RDB file. It is more likely to occur with larger datasets.
    
    After reconnection is initiated, replicationEmptyDbCallback() may get called 
    and try to write to an unconnected socket. This triggered another issue where
    the connection is put into an error state and the connect handler never gets
    called. The problem is a regression introduced by commit c17e597d.
    
    (cherry picked from commit 1980f639)
    9d0388a0
connection.c 14.5 KB