From: Martin Schwenke Date: Mon, 27 Aug 2018 04:53:37 +0000 (+1000) Subject: ctdb-daemon: Do not retry connection to eventd X-Git-Tag: samba-4.8.6~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3a2f0b7fbd6891ec951aa71018cc57d62976796;p=thirdparty%2Fsamba.git ctdb-daemon: Do not retry connection to eventd Confirmation is now received from eventd that it is accepting connections, so this is no longer needed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit b430a1ace69bcef3336907557ab5bf04271c1110) --- diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index eb87067a14b..3c43bf4fa8b 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -251,7 +251,7 @@ int ctdb_start_eventd(struct ctdb_context *ctdb) const char **argv; int fd[2]; pid_t pid; - int ret, i; + int ret; bool status; if (ctdb->ectx == NULL) { @@ -355,17 +355,9 @@ int ctdb_start_eventd(struct ctdb_context *ctdb) tevent_fd_set_auto_close(ectx->eventd_fde); ectx->eventd_pid = pid; - /* Wait to connect to eventd */ - for (i=0; i<10; i++) { - status = eventd_client_connect(ectx); - if (status) { - break; - } - sleep(1); - } - + status = eventd_client_connect(ectx); if (! status) { - DEBUG(DEBUG_ERR, ("Failed to initialize event daemon\n")); + DEBUG(DEBUG_ERR, ("Failed to connect to event daemon\n")); ctdb_stop_eventd(ctdb); return -1; }