aboutsummaryrefslogtreecommitdiff
path: root/src/https.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/https.rs')
-rw-r--r--src/https.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/https.rs b/src/https.rs
index c80d51c..a62ebea 100644
--- a/src/https.rs
+++ b/src/https.rs
@@ -1,5 +1,5 @@
use std::net::SocketAddr;
-use std::sync::Arc;
+use std::sync::{atomic::Ordering, Arc};
use anyhow::Result;
use log::*;
@@ -108,10 +108,13 @@ async fn handle(
.as_ref()
.map(|x| x.len() as i32)
.unwrap_or(0)),
+ ent.calls.load(Ordering::SeqCst),
)
});
if let Some(proxy_to) = ent {
+ proxy_to.calls.fetch_add(1, Ordering::SeqCst);
+
let to_addr = format!("http://{}", proxy_to.target_addr);
info!("Proxying {} {} -> {}", host, path, to_addr);