From: Vsevolod Stakhov Date: Mon, 5 Sep 2016 12:50:12 +0000 (+0100) Subject: [Fix] Correctly propagate redis timeouts to Lua X-Git-Tag: 1.4.0~493 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7abccf3ef2579fa41c4832eff341816d43fe00e;p=thirdparty%2Frspamd.git [Fix] Correctly propagate redis timeouts to Lua --- diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index 815192d27c..203def2d0d 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