Unverified Commit dc7a9d3a authored by 郭伟光's avatar 郭伟光 Committed by GitHub
Browse files

Cleanup: replicationFeedMonitors use the monitor list arg it got (#10417)

Better check the monitors list argument instead of server.monitors in the function,
although they are basically the same in the context, so this doesn't have any
impact on the current code.
parent a6bf5098
...@@ -543,7 +543,8 @@ void replicationFeedStreamFromMasterStream(char *buf, size_t buflen) { ...@@ -543,7 +543,8 @@ void replicationFeedStreamFromMasterStream(char *buf, size_t buflen) {
} }
void replicationFeedMonitors(client *c, list *monitors, int dictid, robj **argv, int argc) { void replicationFeedMonitors(client *c, list *monitors, int dictid, robj **argv, int argc) {
if (!(listLength(server.monitors) && !server.loading)) return; /* Fast path to return if the monitors list is empty or the server is in loading. */
if (monitors == NULL || listLength(monitors) == 0 || server.loading) return;
listNode *ln; listNode *ln;
listIter li; listIter li;
int j; int j;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment