Commit 70d2425c authored by Nils Goroll's avatar Nils Goroll

VDI_Resolve() should not return a director which is admin-unhealthy

Implicitly fixes the same issue for VDI_GetHdr
parent 93a18835
......@@ -95,11 +95,17 @@ VDI_Resolve(VRT_CTX)
VSLb(bo->vsl, SLT_FetchError,
"Director %s returned no backend", d->vcl_name);
}
CHECK_OBJ_ORNULL(d, DIRECTOR_MAGIC);
if (d == NULL)
if (d == NULL) {
VSLb(bo->vsl, SLT_FetchError, "No backend");
else
} else {
AN(d->vdir);
if (d->vdir->admin_health->health == 0)
d = NULL;
}
return (d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment