Commit 81a8ebd7 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by antirez
Browse files

Fix Redis server crash when Lua command exceeds client output buffer

limit.
parent c4d4c1ed
...@@ -755,7 +755,7 @@ void freeClient(redisClient *c) { ...@@ -755,7 +755,7 @@ void freeClient(redisClient *c) {
* a context where calling freeClient() is not possible, because the client * a context where calling freeClient() is not possible, because the client
* should be valid for the continuation of the flow of the program. */ * should be valid for the continuation of the flow of the program. */
void freeClientAsync(redisClient *c) { void freeClientAsync(redisClient *c) {
if (c->flags & REDIS_CLOSE_ASAP) return; if (c->flags & REDIS_CLOSE_ASAP || c->flags & REDIS_LUA_CLIENT) return;
c->flags |= REDIS_CLOSE_ASAP; c->flags |= REDIS_CLOSE_ASAP;
listAddNodeTail(server.clients_to_close,c); listAddNodeTail(server.clients_to_close,c);
} }
......
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