diff options
author | antirez <antirez@gmail.com> | 2017-04-11 16:56:00 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2017-04-21 11:26:27 +0200 |
commit | 697d3abeff1563936da2653a8fa8db78d5dff671 (patch) | |
tree | d6589d676acede79ab12117b87935dcbee6a4058 | |
parent | c9c04b11b971bb0598307cf2aafe8954e7785641 (diff) | |
download | redis-697d3abeff1563936da2653a8fa8db78d5dff671.tar.gz |
Set lua-time-limit default value at safe place.
Otherwise, as it was, it will overwrite whatever the user set.
Close #3703.
-rw-r--r-- | src/scripting.c | 1 | ||||
-rw-r--r-- | src/server.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/scripting.c b/src/scripting.c index 0a2ce1f33..216dfbf19 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -900,7 +900,6 @@ void scriptingInit(int setup) { server.lua_caller = NULL; server.lua_timedout = 0; server.lua_always_replicate_commands = 0; /* Only DEBUG can change it.*/ - server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT; ldbInit(); } diff --git a/src/server.c b/src/server.c index 71bcda7d5..609f39665 100644 --- a/src/server.c +++ b/src/server.c @@ -1533,6 +1533,7 @@ void initServerConfig(void) { server.migrate_cached_sockets = dictCreate(&migrateCacheDictType,NULL); server.next_client_id = 1; /* Client IDs, start from 1 .*/ server.loading_process_events_interval_bytes = (1024*1024*2); + server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT; server.lruclock = getLRUClock(); resetServerSaveParams(); |