diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-04-12 13:41:45 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-04-12 13:42:13 +1000 |
commit | c460d4bbe330df3b01572befe6a1f7883b136ebe (patch) | |
tree | 56a0587397964578321737ba5400b6c5c8e33692 /jim-redis.c | |
parent | 15a1851fbe5ebfde44a0c4a13ef95fdda5edd6c8 (diff) | |
download | jimtcl-c460d4bbe330df3b01572befe6a1f7883b136ebe.zip jimtcl-c460d4bbe330df3b01572befe6a1f7883b136ebe.tar.gz jimtcl-c460d4bbe330df3b01572befe6a1f7883b136ebe.tar.bz2 |
jim-redis: Enable TCP_KEEPALIVE
This is the default already for newer versions of redis.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-redis.c')
-rw-r--r-- | jim-redis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jim-redis.c b/jim-redis.c index a22c8f2..72f55eb 100644 --- a/jim-redis.c +++ b/jim-redis.c @@ -151,6 +151,8 @@ static int jim_redis_cmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) fd = dup(fd); /* Can't fail */ c = redisConnectFd(fd); + /* Enable TCP_KEEPALIVE - this is the default for later redis versions */ + redisEnableKeepAlive(c); /* Now delete the original stream */ Jim_DeleteCommand(interp, argv[1]); snprintf(buf, sizeof(buf), "redis.handle%ld", Jim_GetId(interp)); |