diff options
author | Martin Schwenke <martin@meltin.net> | 2018-08-27 14:53:37 +1000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-09-04 12:14:34 +0200 |
commit | 9987cc39ea777dec95e9f4a8836515722ba263fc (patch) | |
tree | 05715aa98c71c6d30abe727ceb5a0131e1d77d47 /ctdb | |
parent | 46de8d248ff5e45bd6957c27a78b4160213c1432 (diff) | |
download | samba-9987cc39ea777dec95e9f4a8836515722ba263fc.tar.gz |
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit b430a1ace69bcef3336907557ab5bf04271c1110)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/eventscript.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 30916a07ed5..8c87a3db27a 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -219,7 +219,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) { @@ -306,17 +306,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; } |