summaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-10-09 13:18:25 +0200
committerantirez <antirez@gmail.com>2018-10-09 13:18:52 +0200
commit929c686ccee0aacc567a9892931ae46c82a2e8cd (patch)
tree8557900507551dad6242308f64c2e3e73eec8ef2 /src/debug.c
parent69c30965eb15ed86acadd8e9db79feb7b7633497 (diff)
downloadredis-929c686ccee0aacc567a9892931ae46c82a2e8cd.tar.gz
Actually use the protectClient() API where needed.
Related to #4804.
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug.c b/src/debug.c
index 5a8190c96..8cc53d92f 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -345,9 +345,9 @@ NULL
return;
}
emptyDb(-1,EMPTYDB_NO_FLAGS,NULL);
- aeDeleteFileEvent(server.el,c->fd,AE_READABLE);
+ protectClient(c);
int ret = rdbLoad(server.rdb_filename,NULL);
- aeCreateFileEvent(server.el,c->fd,AE_READABLE,readQueryFromClient,c);
+ unprotectClient(c);
if (ret != C_OK) {
addReplyError(c,"Error trying to load the RDB dump");
return;
@@ -357,9 +357,9 @@ NULL
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
if (server.aof_state != AOF_OFF) flushAppendOnlyFile(1);
emptyDb(-1,EMPTYDB_NO_FLAGS,NULL);
- aeDeleteFileEvent(server.el,c->fd,AE_READABLE);
+ protectClient(c);
int ret = loadAppendOnlyFile(server.aof_filename);
- aeCreateFileEvent(server.el,c->fd,AE_READABLE,readQueryFromClient,c);
+ unprotectClient(c);
if (ret != C_OK) {
addReply(c,shared.err);
return;