summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_keepalive.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2008-11-20 13:35:08 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2008-11-20 13:35:08 +1100
commita2a5904f6651b2bfb0913b49fe5c0435f8b91ef1 (patch)
tree803e7f761f9941ac1735ab6f55a1900af5981d14 /ctdb/server/ctdb_keepalive.c
parent94a56ea410c3fd14437f39ebf55da2f4340f29a3 (diff)
downloadsamba-a2a5904f6651b2bfb0913b49fe5c0435f8b91ef1.tar.gz
samba-a2a5904f6651b2bfb0913b49fe5c0435f8b91ef1.tar.xz
samba-a2a5904f6651b2bfb0913b49fe5c0435f8b91ef1.zip
Keepalive packets were only sent every KeepaliveInterval if the socket
had been completely idle during that interval. If we had been sending other packets such as Messages, Calls or Controls there wouldnt be any need for an explicit keepalive and thus we didnt send one. This does make it somewhat awkward when analyzing traces since it is non-intuitive when keepalives are sent and when they are not sent. Change the keepalive logic to always send a keepalive regardless of whether the link is idle or not. (This used to be ctdb commit 7a18f33ec7512100dd067c65f0470889ff8fd591)
Diffstat (limited to 'ctdb/server/ctdb_keepalive.c')
-rw-r--r--ctdb/server/ctdb_keepalive.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ctdb/server/ctdb_keepalive.c b/ctdb/server/ctdb_keepalive.c
index 1e46f5f0de9..524feb16966 100644
--- a/ctdb/server/ctdb_keepalive.c
+++ b/ctdb/server/ctdb_keepalive.c
@@ -68,10 +68,8 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
continue;
}
- if (node->tx_cnt == 0) {
- DEBUG(DEBUG_DEBUG,("sending keepalive to %u\n", node->pnn));
- ctdb_send_keepalive(ctdb, node->pnn);
- }
+ DEBUG(DEBUG_DEBUG,("sending keepalive to %u\n", node->pnn));
+ ctdb_send_keepalive(ctdb, node->pnn);
node->tx_cnt = 0;
}