aboutsummaryrefslogtreecommitdiff
path: root/src/proxy_config.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-08 22:29:08 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-08 22:29:08 +0100
commit62c745898d35287577caa0bd384cc7bc39f6b4ec (patch)
treec2730e745f39ff54ad000cb38150b77c385958df /src/proxy_config.rs
parent7dbf848de3137158d1e12c2cd547ab4778fcf5a0 (diff)
downloadtricot-62c745898d35287577caa0bd384cc7bc39f6b4ec.tar.gz
tricot-62c745898d35287577caa0bd384cc7bc39f6b4ec.zip
Inverse how priorities work
Diffstat (limited to 'src/proxy_config.rs')
-rw-r--r--src/proxy_config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/proxy_config.rs b/src/proxy_config.rs
index 399b52a..8a64f53 100644
--- a/src/proxy_config.rs
+++ b/src/proxy_config.rs
@@ -50,7 +50,7 @@ pub struct ProxyEntry {
// Counts the number of times this proxy server has been called to
// This implements a round-robin load balancer if there are multiple
// entries for the same host and same path prefix.
- pub calls: atomic::AtomicU64,
+ pub calls: atomic::AtomicI64,
}
impl std::fmt::Display for ProxyEntry {
@@ -69,7 +69,7 @@ impl std::fmt::Display for ProxyEntry {
if !self.add_headers.is_empty() {
write!(f, " +Headers: {:?}", self.add_headers)?;
}
- Ok(())
+ write!(f, " ({})", self.calls.load(atomic::Ordering::Relaxed))
}
}
@@ -125,7 +125,7 @@ fn parse_tricot_tag(
path_prefix,
priority,
add_headers: add_headers.to_vec(),
- calls: atomic::AtomicU64::from(0),
+ calls: atomic::AtomicI64::from(0),
})
}