Skip to content

Commit

Permalink
code review: holding the lock until the very end
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Aug 27, 2024
1 parent 9a89d0b commit 9849a77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -4377,12 +4377,12 @@ int finishShutdown(void) {
* send them pending writes. */
flushReplicasOutputBuffers();

/* Handle cluster-related matters when shutdown. */
if (server.cluster_enabled) clusterHandleServerShutdown();

/* Close the listening sockets. Apparently this allows faster restarts. */
closeListeningSockets(1);

/* Handle cluster-related matters when shutdown. */
if (server.cluster_enabled) clusterHandleServerShutdown();

serverLog(LL_WARNING, "%s is now ready to exit, bye bye...", server.sentinel_mode ? "Sentinel" : "Valkey");
return C_OK;

Expand Down

0 comments on commit 9849a77

Please sign in to comment.