This commit is contained in:
Alex Gershberg 2026-02-04 04:54:08 +07:00 committed by GitHub
commit c26e9c1604
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6897,8 +6897,15 @@ void monitorCommand(client *c) {
return;
}
/* ignore MONITOR if already slave or in monitor mode */
if (c->flags & CLIENT_SLAVE) return;
/* ignore MONITOR if already slave */
if (c->flags & CLIENT_SLAVE) {
if (c->flags & CLIENT_MONITOR) {
addReplyError(c, "already monitoring");
return;
} else {
return;
}
}
c->flags |= (CLIENT_SLAVE|CLIENT_MONITOR);
listAddNodeTail(server.monitors,c);