diff --git a/src/server/script_mgr.cc b/src/server/script_mgr.cc index e31b160c0..1e2427fa7 100644 --- a/src/server/script_mgr.cc +++ b/src/server/script_mgr.cc @@ -216,6 +216,10 @@ io::Result ScriptMgr::Insert(string_view body, Interpreter Interpreter::FuncSha1(body, sha_buf); string_view sha{sha_buf, std::strlen(sha_buf)}; + if (interpreter->Exists(sha)) { + return string{sha}; + } + string_view orig_body = body; auto params_opt = DeduceParams(&body);