Keepalive packets were only sent every KeepaliveInterval if the socket
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 20 Nov 2008 02:35:08 +0000 (13:35 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 27 Nov 2008 00:47:18 +0000 (11:47 +1100)
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.

server/ctdb_keepalive.c

index 1e46f5f0de97632d590f818280d27c58205f262e..524feb1696617ff6aba77ddcec1bb6b1de3ec169 100644 (file)
@@ -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;
        }