From 7a02b09b01363fdf7e12f10eb46f18492823a2a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 18 Apr 2007 11:55:54 +1000 Subject: started adding a cleaner daemon finish method (This used to be ctdb commit 5ef0cd83d7f24616dad85cece485b770376ecd45) --- ctdb/common/ctdb_client.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ctdb/common/ctdb_client.c') diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c index aca243eda1..4e5e7701cc 100644 --- a/ctdb/common/ctdb_client.c +++ b/ctdb/common/ctdb_client.c @@ -434,6 +434,11 @@ void ctdb_connect_wait(struct ctdb_context *ctdb) r.hdr.operation = CTDB_REQ_CONNECT_WAIT; DEBUG(3,("ctdb_connect_wait: sending to ctdbd\n")); + + /* if the domain socket is not yet open, open it */ + if (ctdb->daemon.sd==-1) { + ux_socket_connect(ctdb); + } res = ctdb_queue_send(ctdb->daemon.queue, (uint8_t *)&r.hdr, r.hdr.length); if (res != 0) { -- cgit