dragonfly
                                
                                 dragonfly copied to clipboard
                                
                                    dragonfly copied to clipboard
                            
                            
                            
                        fix: reduce delay when stop replica #3020
this should fix the problem: Running replicaof no one on replica in full sync state returns after more than 20 seconds the problem was that after we shutdown the socket the buffer still contained data and we processed it.
Actually it might be that we need just to switch those two lines 🤔
https://github.com/dragonflydb/dragonfly/blob/3dd6c4959c3056d6f007cc4001e0923302a566a2/src/server/replica.cc#L144-L145
With this order, the loop continues working and blocks because ENABLE is still set
With an inverse order we should be cautious that nothing overrides it before cancel started