1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

add a node->tx_cnt counter

only send keepalive packets if the count is zero

(This used to be ctdb commit 2cbd424231caccf0a531cf6501761115efe68f3e)
This commit is contained in:
Ronnie Sahlberg 2007-05-19 10:20:19 +10:00
parent 99652bdb94
commit 9f7b9faf64
2 changed files with 6 additions and 1 deletions

View File

@ -64,8 +64,12 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
*/
continue;
}
if (node->tx_cnt == 0) {
ctdb_send_keepalive(ctdb, node->vnn);
}
ctdb_send_keepalive(ctdb, node->vnn);
node->tx_cnt = 0;
}
event_add_timed(ctdb->ev, ctdb,

View File

@ -93,6 +93,7 @@ struct ctdb_node {
/* used by the dead node monitoring */
uint32_t dead_count;
uint32_t rx_cnt;
uint32_t tx_cnt;
/* a list of controls pending to this node, so we can time them out quickly
if the node becomes disconnected */