summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_redis.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-02-03 19:12:42 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-02-03 19:12:42 +0000
commit9d275f06c4089244c8de3a932724b983b4f4adc3 (patch)
treec19c8809734624a0472da2a8f27dff79d3fdee8c /src/lua/lua_redis.c
parent8f35dd59707be990cc078f1831762f020c8a373a (diff)
downloadrspamd-9d275f06c4089244c8de3a932724b983b4f4adc3.tar.gz
rspamd-9d275f06c4089244c8de3a932724b983b4f4adc3.zip
[Fix] Set symcache item in coroutine calls
Diffstat (limited to 'src/lua/lua_redis.c')
-rw-r--r--src/lua/lua_redis.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
index 3d5ac3db9..8b72a52da 100644
--- a/src/lua/lua_redis.c
+++ b/src/lua/lua_redis.c
@@ -679,6 +679,11 @@ lua_redis_callback_sync (redisAsyncContext *ac, gpointer r, gpointer priv)
ctx->thread = NULL;
results = lua_redis_push_results(ctx, thread->lua_state);
+
+ if (ud->item) {
+ rspamd_symcache_set_cur_item (ud->task, ud->item);
+ }
+
lua_thread_resume (thread, results);
lua_redis_cleanup_events(ctx);
}