http and ws: fix build errors with --no-default-features

This commit is contained in:
Joakim Frostegård 2024-01-27 18:21:44 +01:00
parent acabf1581f
commit 964636db7c
4 changed files with 16 additions and 7 deletions

View file

@ -99,6 +99,7 @@ impl TorrentMaps {
}
}
#[cfg(feature = "metrics")]
pub fn update_torrent_metrics(&self) {
self.ipv4.torrent_gauge.set(self.ipv4.torrents.len() as f64);
self.ipv6.torrent_gauge.set(self.ipv6.torrents.len() as f64);