Module: kamailio
Branch: master
Commit: e97ae3e621b2e7f28bd01069a9fbdd77ea16663f
URL:
https://github.com/kamailio/kamailio/commit/e97ae3e621b2e7f28bd01069a9fbdd7…
Author: Andreas Granig <agranig(a)linguin.org>
Committer: GitHub <noreply(a)github.com>
Date: 2021-11-30T11:03:07+01:00
Merge pull request #2960 from apogrebennyk/apogrebennyk/db_redis_update
db_redis: don't leave unconsumed redis replies in case of error
---
Modified: src/modules/db_redis/redis_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e97ae3e621b2e7f28bd01069a9fbdd7…
Patch:
https://github.com/kamailio/kamailio/commit/e97ae3e621b2e7f28bd01069a9fbdd7…
---
diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c
index f7e26e693e..a53d1a3443 100644
--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -2249,6 +2249,7 @@ static int db_redis_perform_update(const db1_con_t* _h,
km_redis_con_t *con, con
db_redis_key_free(&all_type_keys);
db_redis_key_free(&new_type_keys);
+ db_redis_consume_replies(con);
return 0;
error:
@@ -2260,6 +2261,7 @@ static int db_redis_perform_update(const db1_con_t* _h,
km_redis_con_t *con, con
db_redis_key_free(&type_keys);
db_redis_key_free(&set_keys);
db_redis_key_free(&new_type_keys);
+ db_redis_consume_replies(con);
return -1;
}