diff options
author | antirez <antirez@gmail.com> | 2018-10-09 13:18:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-09 13:18:52 +0200 |
commit | 929c686ccee0aacc567a9892931ae46c82a2e8cd (patch) | |
tree | 8557900507551dad6242308f64c2e3e73eec8ef2 /src/debug.c | |
parent | 69c30965eb15ed86acadd8e9db79feb7b7633497 (diff) | |
download | redis-929c686ccee0aacc567a9892931ae46c82a2e8cd.tar.gz |
Actually use the protectClient() API where needed.
Related to #4804.
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 8 |
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; |