diff options
author | Qu Chen <QuChen88@users.noreply.github.com> | 2022-05-15 04:07:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 14:07:45 +0300 |
commit | a7d6ca9770933b7d9fec7c137232831f08ba7ccc (patch) | |
tree | 70f037669a416bd307f3284303c8e01940371bba /src/server.c | |
parent | 4b262182d95f286222039ee52fc420eb1f9bb955 (diff) | |
download | redis-a7d6ca9770933b7d9fec7c137232831f08ba7ccc.tar.gz |
Make the check for if script is running or not consistent (#10725)
sometimes it is using `scriptIsRunning()` and other times it is using `server.in_script`.
We should use the `scriptIsRunning()` method consistently throughout the code base.
Removed server.in_script sine it's no longer used / needed.
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c index 95f32f83f..14019b671 100644 --- a/src/server.c +++ b/src/server.c @@ -2500,7 +2500,6 @@ void initServer(void) { server.pubsub_patterns = dictCreate(&keylistDictType); server.pubsubshard_channels = dictCreate(&keylistDictType); server.cronloops = 0; - server.in_script = 0; server.in_exec = 0; server.busy_module_yield_flags = BUSY_MODULE_YIELD_NONE; server.busy_module_yield_reply = NULL; @@ -3566,7 +3565,7 @@ int processCommand(client *c) { * That is unless lua_timedout, in which case client may run * some commands. */ serverAssert(!server.in_exec); - serverAssert(!server.in_script); + serverAssert(!scriptIsRunning()); } moduleCallCommandFilters(c); |