diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-05 13:50:12 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-05 13:50:12 +0100 |
commit | b7abccf3ef2579fa41c4832eff341816d43fe00e (patch) | |
tree | a68b9af4a5c4e3053408a00b88cc8dd35da1f68a /src/lua/lua_redis.c | |
parent | df3173c9a8c3199349baaf11698ad23aa7f64e25 (diff) | |
download | rspamd-b7abccf3ef2579fa41c4832eff341816d43fe00e.tar.gz rspamd-b7abccf3ef2579fa41c4832eff341816d43fe00e.zip |
[Fix] Correctly propagate redis timeouts to Lua
Diffstat (limited to 'src/lua/lua_redis.c')
-rw-r--r-- | src/lua/lua_redis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index 815192d27..203def2d0 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -412,6 +412,8 @@ lua_redis_timeout (int fd, short what, gpointer u) ac = sp_ud->c->ctx; /* Set to NULL to avoid double free in dtor */ sp_ud->c->ctx = NULL; + ac->err = REDIS_ERR_IO; + errno = ETIMEDOUT; /* * This will call all callbacks pending so the entire context * will be destructed |