Skip to content

Commit f7139d9

Browse files
committed
fix: leastconn skips first backend
1 parent 59e8bdd commit f7139d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vmod_dynamic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ dom_find_leastconn(VRT_CTX, struct dynamic_domain *dom)
272272

273273
do {
274274
CHECK_OBJ_ORNULL(next, DYNAMIC_REF_MAGIC);
275-
if (next != NULL)
276-
next = VTAILQ_NEXT(next, list);
277275
if (next == NULL)
278276
break;
279277

@@ -290,6 +288,8 @@ dom_find_leastconn(VRT_CTX, struct dynamic_domain *dom)
290288
}
291289
}
292290
}
291+
292+
next = VTAILQ_NEXT(next, list);
293293
} while (1);
294294

295295
if (best_next != NULL) {

0 commit comments

Comments
 (0)