fix(server): Fix crash when connection uses multiple lua scripts (#2073)

This commit is contained in:
Shahar Mike 2023-10-25 22:44:09 +03:00 committed by GitHub
parent 67b8908805
commit b2e989a4fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -1903,8 +1903,10 @@ void Service::Exec(CmdArgList args, ConnectionContext* cntx) {
}
}
if (exec_info.preborrowed_interpreter)
if (exec_info.preborrowed_interpreter) {
ServerState::tlocal()->ReturnInterpreter(exec_info.preborrowed_interpreter);
exec_info.preborrowed_interpreter = nullptr;
}
if (scheduled) {
VLOG(1) << "Exec unlocking " << exec_info.body.size() << " commands";