diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-14 13:53:53 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-15 13:51:26 +0200 |
commit | 34a158bbda215b1ceec833359dd5b889c9abfb4b (patch) | |
tree | 4d1275724b908c55201584eb36a2cf720d3d15c7 /src/providers | |
parent | 9ab243b369ba317cc964080786dbcdebaf23d6be (diff) | |
download | sssd-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.gz sssd-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.bz2 sssd-34a158bbda215b1ceec833359dd5b889c9abfb4b.zip |
FO: Don't retry the same server if it's not working
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/fail_over.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index eb9c1050..d6beeb60 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; } |