summaryrefslogtreecommitdiffstats
path: root/src/providers/fail_over.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/fail_over.c')
-rw-r--r--src/providers/fail_over.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index d6beeb60..422cd675 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1006,6 +1006,15 @@ fo_resolve_service_done(struct tevent_req *subreq)
DEBUG(1, ("Failed to resolve server '%s': %s\n",
common->name,
resolv_strerror(resolv_status)));
+ /* If the resolver failed to resolve a hostname but did not
+ * encounter an error, tell the caller to retry another server.
+ *
+ * If there are no more servers to try, the next request would
+ * just shortcut with ENOENT.
+ */
+ if (ret == ENOENT) {
+ ret = EAGAIN;
+ }
set_server_common_status(common, SERVER_NOT_WORKING);
} else {
set_server_common_status(common, SERVER_NAME_RESOLVED);