summaryrefslogtreecommitdiffstats
path: root/src/providers
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 /src/providers
parent9ab243b369ba317cc964080786dbcdebaf23d6be (diff)
downloadsssd-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.gz
sssd-34a158bbda215b1ceec833359dd5b889c9abfb4b.tar.xz
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index eb9c10503..d6beeb60e 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;
}