summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/common/ctdb.c10
-rw-r--r--ctdb/common/ctdb_daemon.c6
-rw-r--r--ctdb/tcp/tcp_init.c6
3 files changed, 7 insertions, 15 deletions
diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c
index 0add6f1d82..d8b4859232 100644
--- a/ctdb/common/ctdb.c
+++ b/ctdb/common/ctdb.c
@@ -346,13 +346,5 @@ int ctdb_start(struct ctdb_context *ctdb)
return ctdbd_start(ctdb);
}
- res = ctdb->methods->start(ctdb);
-
- if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) {
- /* wait until all nodes are connected (should not be needed
- outide of test code) */
- ctdb_connect_wait(ctdb);
- }
-
- return res;
+ return ctdb->methods->start(ctdb);
}
diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c
index 71fc8f47f3..dc1e147716 100644
--- a/ctdb/common/ctdb_daemon.c
+++ b/ctdb/common/ctdb_daemon.c
@@ -35,12 +35,6 @@ static void ctdb_main_loop(struct ctdb_context *ctdb)
{
ctdb->methods->start(ctdb);
- if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) {
- /* wait until all nodes are connected (should not be needed
- outide of test code) */
- ctdb_connect_wait(ctdb);
- }
-
/* go into a wait loop to allow other nodes to complete */
event_loop_wait(ctdb->ev);
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c
index 0058e7ad85..0ab12790d4 100644
--- a/ctdb/tcp/tcp_init.c
+++ b/ctdb/tcp/tcp_init.c
@@ -46,6 +46,12 @@ int ctdb_tcp_start(struct ctdb_context *ctdb)
ctdb_tcp_node_connect, node);
}
+ if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) {
+ /* wait until all nodes are connected (should not be needed
+ outide of test code) */
+ ctdb_connect_wait(ctdb);
+ }
+
return 0;
}