Skip to content

Commit

Permalink
Set TCP keepalive on inbound clusterbus connections (redis#9230)
Browse files Browse the repository at this point in the history
Set TCP keepalive on inbound clusterbus connections to prevent memory leak
  • Loading branch information
qetu3790 committed Jul 16, 2021
1 parent 6c83db5 commit 0977095
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster.c
Expand Up @@ -736,6 +736,7 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
return;
}
connEnableTcpNoDelay(conn);
connKeepAlive(conn,server.cluster_node_timeout * 2);

/* Use non-blocking I/O for cluster messages. */
serverLog(LL_VERBOSE,"Accepting cluster node connection from %s:%d", cip, cport);
Expand Down

0 comments on commit 0977095

Please sign in to comment.