summaryrefslogtreecommitdiffstats
path: root/src/libserver/redis_pool.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-28 12:13:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-28 12:13:52 +0100
commit72ceee149ff5dc360d1c028689f45840f1f2cf6f (patch)
treea695c337bb5f4089d02d65d2b1c2a4b32cb33967 /src/libserver/redis_pool.h
parent8879db43df630625cb3fb86ff808f83d487ad484 (diff)
downloadrspamd-72ceee149ff5dc360d1c028689f45840f1f2cf6f.tar.gz
rspamd-72ceee149ff5dc360d1c028689f45840f1f2cf6f.zip
[Minor] Allow to close connection to redis without pooling
Issue: #2796
Diffstat (limited to 'src/libserver/redis_pool.h')
-rw-r--r--src/libserver/redis_pool.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libserver/redis_pool.h b/src/libserver/redis_pool.h
index a881a0a38..7a9bf99ab 100644
--- a/src/libserver/redis_pool.h
+++ b/src/libserver/redis_pool.h
@@ -53,13 +53,19 @@ struct redisAsyncContext* rspamd_redis_pool_connect (
const gchar *db, const gchar *password,
const char *ip, int port);
+enum rspamd_redis_pool_release_type {
+ RSPAMD_REDIS_RELEASE_DEFAULT = 0,
+ RSPAMD_REDIS_RELEASE_FATAL = 1,
+ RSPAMD_REDIS_RELEASE_ENFORCE
+};
+
/**
* Release a connection to the pool
* @param pool
* @param ctx
*/
void rspamd_redis_pool_release_connection (struct rspamd_redis_pool *pool,
- struct redisAsyncContext *ctx, gboolean is_fatal);
+ struct redisAsyncContext *ctx, enum rspamd_redis_pool_release_type how);
/**
* Stops redis pool and destroys it