Skip to content

Commit

Permalink
Set TCP keepalive on inbound clusterbus connections (#9230)
Browse files Browse the repository at this point in the history
Set TCP keepalive on inbound clusterbus connections to prevent memory leak

(cherry picked from commit f03af47)
  • Loading branch information
qetu3790 authored and oranagra committed Jul 21, 2021
1 parent 3941d2e commit 240ff70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster.c
Expand Up @@ -696,6 +696,7 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
}
connNonBlock(conn);
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 240ff70

Please sign in to comment.