test: code cleanup
[poolifier.git] / src / pools / selection-strategies / round-robin-worker-choice-strategy.ts
index 7356a0bc2f4b376ef53eb205529cddeddbd0f434..6884a5d277b87892daeb4d8acaba99bc510c671a 100644 (file)
@@ -44,8 +44,8 @@ export class RoundRobinWorkerChoiceStrategy<
   /** @inheritDoc */
   public choose (): number | undefined {
     const chosenWorkerNodeKey = this.nextWorkerNodeKey
+    this.setPreviousWorkerNodeKey(chosenWorkerNodeKey)
     this.roundRobinNextWorkerNodeKey()
-    this.checkNextWorkerNodeEligibility(chosenWorkerNodeKey)
     return chosenWorkerNodeKey
   }