Skip to content
This repository was archived by the owner on Oct 31, 2020. It is now read-only.

Commit 8aa3870

Browse files
committed
fix traffic mirroring
1 parent 30b4859 commit 8aa3870

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rl-proxy.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,7 @@ static void proxy_if_credits(http_exchange &ex,
490490

491491
if (mirror_pool) {
492492
uint64_t count = request_count++;
493-
unsigned mod = conf.mirror_percentage / 100.0f;
494-
if (mod && (count % mod) == 0) {
493+
if (count % 100 < conf.mirror_percentage) {
495494
task::spawn([=] {
496495
mirror_task(r, mirror_pool);
497496
});

0 commit comments

Comments
 (0)