summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-08-14 13:53:53 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-15 13:51:26 +0200
commit34a158bbda215b1ceec833359dd5b889c9abfb4b (patch)
tree4d1275724b908c55201584eb36a2cf720d3d15c7
parent9ab243b369ba317cc964080786dbcdebaf23d6be (diff)
downloadsssd_unused-34a158bbda215b1ceec833359dd5b889c9abfb4b.zip
sssd_unused-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.gz
sssd_unused-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.xz
FO: Don't retry the same server if it's not working
-rw-r--r--src/providers/fail_over.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index eb9c105..d6beeb6 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -99,7 +99,7 @@ struct server_common {
char *name;
struct resolv_hostent *rhostent;
struct resolve_service_request *request_list;
- int server_status;
+ enum server_status server_status;
struct timeval last_status_change;
};
@@ -716,7 +716,8 @@ get_first_server_entity(struct fo_service *service, struct fo_server **_server)
*/
if (service->last_tried_server != NULL &&
service->last_tried_server->primary) {
- if (service->last_tried_server->port_status == PORT_NEUTRAL) {
+ if (service->last_tried_server->port_status == PORT_NEUTRAL &&
+ server_works(service->last_tried_server)) {
server = service->last_tried_server;
goto done;
}