From b7abccf3ef2579fa41c4832eff341816d43fe00e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 5 Sep 2016 13:50:12 +0100 Subject: [Fix] Correctly propagate redis timeouts to Lua --- src/lua/lua_redis.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3