From 651a2ce19012f112439a46716637307b052dd150 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Sat, 29 Jun 2024 22:47:40 +0100 Subject: Fix HLS viewer count computation It was making a list of the local socket addresses instead of the remote ones and then uninquing and counting it, which always resulted in 1 viewer. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e82cfee..bcbd969 100644 --- a/src/main.rs +++ b/src/main.rs @@ -294,7 +294,7 @@ fn get_https_connected_ips() -> Result> { .chain(procfs::net::tcp6()?) .filter_map(|t| { if t.local_address.port() == 443 && t.state == TcpState::Established { - return Some(t.local_address.ip()); + return Some(t.remote_address.ip()); } None }) -- cgit v1.2.3-70-g09d2