mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
networking: flushSlavesOutputBuffers bugfix
This commit is contained in:
parent
583933e2d6
commit
d3f7eb0c87
@ -2468,7 +2468,6 @@ void flushSlavesOutputBuffers(void) {
|
|||||||
listRewind(server.slaves,&li);
|
listRewind(server.slaves,&li);
|
||||||
while((ln = listNext(&li))) {
|
while((ln = listNext(&li))) {
|
||||||
client *slave = listNodeValue(ln);
|
client *slave = listNodeValue(ln);
|
||||||
int events;
|
|
||||||
|
|
||||||
/* Note that the following will not flush output buffers of slaves
|
/* Note that the following will not flush output buffers of slaves
|
||||||
* in STATE_ONLINE but having put_online_on_ack set to true: in this
|
* in STATE_ONLINE but having put_online_on_ack set to true: in this
|
||||||
@ -2476,9 +2475,8 @@ void flushSlavesOutputBuffers(void) {
|
|||||||
* of put_online_on_ack is to postpone the moment it is installed.
|
* of put_online_on_ack is to postpone the moment it is installed.
|
||||||
* This is what we want since slaves in this state should not receive
|
* This is what we want since slaves in this state should not receive
|
||||||
* writes before the first ACK. */
|
* writes before the first ACK. */
|
||||||
events = aeGetFileEvents(server.el,slave->fd);
|
if (slave->replstate == SLAVE_STATE_ONLINE &&
|
||||||
if (events & AE_WRITABLE &&
|
!slave->repl_put_online_on_ack &&
|
||||||
slave->replstate == SLAVE_STATE_ONLINE &&
|
|
||||||
clientHasPendingReplies(slave))
|
clientHasPendingReplies(slave))
|
||||||
{
|
{
|
||||||
writeToClient(slave->fd,slave,0);
|
writeToClient(slave->fd,slave,0);
|
||||||
|
Loading…
Reference in New Issue
Block a user