From fce8abc1c19ab731f5c84797aa71b4d49921913f Mon Sep 17 00:00:00 2001 From: zhenwei pi Date: Tue, 30 Aug 2022 11:44:01 +0800 Subject: 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 --- ssl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ssl.c') diff --git a/ssl.c b/ssl.c index 887e1fe..a05b898 100644 --- a/ssl.c +++ b/ssl.c @@ -32,6 +32,7 @@ #include "hiredis.h" #include "async.h" +#include "net.h" #include #include @@ -579,6 +580,7 @@ static void redisSSLAsyncWrite(redisAsyncContext *ac) { } redisContextFuncs redisContextSSLFuncs = { + .close = redisNetClose, .free_privctx = redisSSLFree, .async_read = redisSSLAsyncRead, .async_write = redisSSLAsyncWrite, -- cgit v1.2.3