From 8d0b21c4037ba79939f250d4bd7d4f71bfc798c1 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 23 Oct 2019 13:20:23 -0400 Subject: [PATCH] If a replica is about to be closed, don't wait on its lock (potential deadlock) Former-commit-id: 4986dc6da9855ba14d760a89f13ec40c8bea4baf --- src/replication.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/replication.cpp b/src/replication.cpp index eb8dec503..5abfd2514 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -384,6 +384,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { /* Don't feed slaves that are still waiting for BGSAVE to start */ if (replica->replstate == SLAVE_STATE_WAIT_BGSAVE_START) continue; + if (replica->flags & CLIENT_CLOSE_ASAP) continue; std::unique_locklock)> lock(replica->lock); if (serverTL->current_client && FSameHost(serverTL->current_client, replica)) {