From 34a158bbda215b1ceec833359dd5b889c9abfb4b Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 14 Aug 2012 13:53:53 +0200 Subject: FO: Don't retry the same server if it's not working --- src/providers/fail_over.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/providers') 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; } -- cgit