Permalink
Browse files

Enforce admin health at director level

  • Loading branch information...
bsdphk committed Nov 14, 2017
1 parent 7de8e83 commit 5b81596eb498a33b6ec17caa83ca1087ecbf7afc
Showing with 7 additions and 5 deletions.
  1. +7 −5 bin/varnishd/cache/cache_director.c
@@ -172,16 +172,18 @@ VDI_Http1Pipe(struct req *req, struct busyobj *bo)
*/
int
VRT_Healthy(VRT_CTX, VCL_BACKEND be)
VRT_Healthy(VRT_CTX, VCL_BACKEND d)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (be == NULL)
if (d == NULL)
return (0);
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
if (!VDI_Healthy(d, NULL))
return (0);
CHECK_OBJ_NOTNULL(be, DIRECTOR_MAGIC);
if (be->healthy == NULL)
if (d->healthy == NULL)
return (1);
return (be->healthy(be, ctx->bo, NULL));
return (d->healthy(d, ctx->bo, NULL));
}
/* Send Event ----------------------------------------------------------

0 comments on commit 5b81596

Please sign in to comment.