mirror of
https://github.com/fluencelabs/redis
synced 2025-06-15 02:01:21 +00:00
Set SO_KEEPALIVE on client sockets if configured to do so.
This commit is contained in:
@ -59,6 +59,8 @@ redisClient *createClient(int fd) {
|
||||
if (fd != -1) {
|
||||
anetNonBlock(NULL,fd);
|
||||
anetEnableTcpNoDelay(NULL,fd);
|
||||
if (server.tcpkeepalive)
|
||||
anetKeepAlive(NULL,fd,server.tcpkeepalive);
|
||||
if (aeCreateFileEvent(server.el,fd,AE_READABLE,
|
||||
readQueryFromClient, c) == AE_ERR)
|
||||
{
|
||||
|
Reference in New Issue
Block a user