[sr-dev] git:4.0: modules/ndb_redis: b/ f redisc_exec returns false if redis server is down.

Vicente Hernando vhernando at systemonenoc.com
Tue Apr 9 10:12:17 CEST 2013


Module: sip-router
Branch: 4.0
Commit: c907eff8140bd07022aaf028741392322892b2f4
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c907eff8140bd07022aaf028741392322892b2f4

Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date:   Tue Apr  9 01:03:49 2013 +0200

modules/ndb_redis: b/f redisc_exec returns false if redis server is down.

---

 modules/ndb_redis/redis_client.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c
index 0d8f703..322cabe 100644
--- a/modules/ndb_redis/redis_client.c
+++ b/modules/ndb_redis/redis_client.c
@@ -366,6 +366,10 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
 		if(redisc_reconnect_server(rsrv)==0)
 		{
 			rpl->rplRedis = redisvCommand(rsrv->ctxRedis, cmd->s, ap);
+		} else {
+			LM_ERR("unable to reconnect to redis server: %.*s\n", srv->len, srv->s);
+			cmd->s[cmd->len] = c;
+			goto error_exec;
 		}
 	}
 	cmd->s[cmd->len] = c;




More information about the sr-dev mailing list