add a new ctdb_ltdb function to delete a record in a normal database
[sahlberg/ctdb.git] / server / ctdb_keepalive.c
index 1e46f5f0de97632d590f818280d27c58205f262e..b4899b746f471ce3f4cde40faa22455b98f6178f 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/events/events.h"
+#include "lib/tevent/tevent.h"
 #include "system/filesys.h"
 #include "system/wait.h"
 #include "../include/ctdb_private.h"
@@ -37,6 +37,11 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
        /* send a keepalive to all other nodes, unless */
        for (i=0;i<ctdb->num_nodes;i++) {
                struct ctdb_node *node = ctdb->nodes[i];
+
+               if (node->flags & NODE_FLAGS_DELETED) {
+                       continue;
+               }
+
                if (node->pnn == ctdb->pnn) {
                        continue;
                }
@@ -68,10 +73,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;
        }