summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorMark Nunberg <mnunberg@haskalah.org>2019-02-21 11:49:25 -0500
committerMark Nunberg <mnunberg@haskalah.org>2019-02-21 11:49:25 -0500
commit5eb6958870b71d30e3ed63e65e9f1d546dc419ec (patch)
treee2ac8ce65fa180fd28c1177089e450e3554ea868 /hiredis.h
parent1ec4aefba6d3690c461ea870eab0984a2cb597f0 (diff)
Allow option for async connections to not automatically free
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index 0d646f8..4025869 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -77,6 +77,12 @@
/* Flag that is set when this connection is done through SSL */
#define REDIS_SSL 0x100
+/**
+ * Flag that indicates the user does not want the context to
+ * be automatically freed upon error
+ */
+#define REDIS_NO_AUTO_FREE 0x200
+
#define REDIS_KEEPALIVE_INTERVAL 15 /* seconds */
/* number of times we retry to connect in the case of EADDRNOTAVAIL and
@@ -121,6 +127,12 @@ struct redisSsl;
#define REDIS_OPT_NONBLOCK 0x01
#define REDIS_OPT_REUSEADDR 0x02
+/**
+ * Don't automatically free the async object on a connection failure,
+ * or other implicit conditions. Only free on an explicit call to disconnect() or free()
+ */
+#define REDIS_OPT_NOAUTOFREE 0x04
+
typedef struct {
/*
* the type of connection to use. This also indicates which