diff options
Diffstat (limited to 'src/networking.c')
-rw-r--r-- | src/networking.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index 6e5d32489..3f14b17c8 100644 --- a/src/networking.c +++ b/src/networking.c @@ -58,7 +58,9 @@ redisClient *createClient(int fd) { * contexts (for instance a Lua script) we need a non connected client. */ if (fd != -1) { anetNonBlock(NULL,fd); - anetTcpNoDelay(NULL,fd); + anetEnableTcpNoDelay(NULL,fd); + if (server.tcpkeepalive) + anetKeepAlive(NULL,fd,server.tcpkeepalive); if (aeCreateFileEvent(server.el,fd,AE_READABLE, readQueryFromClient, c) == AE_ERR) { |