return 0;
}
- if (tnode->fd == -1) {
- close(tnode->fd);
- tnode->fd = -1;
- }
-
+ /*
+ shutdown and try to restart a connection to a node after it has been
+ disconnected
+ */
+ static void ctdb_tcp_restart(struct ctdb_node *node)
+ {
+ struct ctdb_tcp_node *tnode = talloc_get_type(
+ node->private_data, struct ctdb_tcp_node);
+
+ DEBUG(0,("Tearing down connection to dead node :%d\n", node->pnn));
+
++ tnode->fd = -1;
+ ctdb_queue_set_fd(tnode->out_queue, -1);
+
+ event_add_timed(node->ctdb->ev, tnode, timeval_zero(),
+ ctdb_tcp_node_connect, node);
+ }
+
/*
shutdown the transport