diff options
author | zhenwei pi <pizhenwei@bytedance.com> | 2022-08-30 11:44:01 +0800 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2022-09-02 10:25:52 -0700 |
commit | fce8abc1c19ab731f5c84797aa71b4d49921913f (patch) | |
tree | ce362bac272df3eb6c7ef1039110f830a12f2f90 /ssl.c | |
parent | cfb6ca881132f7d44121935f55493e144511fbb6 (diff) |
Introduce .close method for redisContextFuncs
Currently, hiredis supports TCP/SSL/Unix, all of the connection types
use a single FD(int), close() is enough to close a connection. For the
further step, introduce .close method for redisContextFuncs, this
allows to close a complex connection context, for example RDMA.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Diffstat (limited to 'ssl.c')
-rw-r--r-- | ssl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include "hiredis.h" #include "async.h" +#include "net.h" #include <assert.h> #include <errno.h> @@ -579,6 +580,7 @@ static void redisSSLAsyncWrite(redisAsyncContext *ac) { } redisContextFuncs redisContextSSLFuncs = { + .close = redisNetClose, .free_privctx = redisSSLFree, .async_read = redisSSLAsyncRead, .async_write = redisSSLAsyncWrite, |