Skip to content

Commit 0f1ff6e

Browse files
committed
Explicitly refuse to gather any stats if gather_stats is false or the license key is empty.
1 parent 3f91572 commit 0f1ff6e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/rust/lqosd/src/throughput_tracker/stats_submission.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ pub(crate) fn submit_throughput_stats(
5353
counter: u8,
5454
system_usage_actor: crossbeam_channel::Sender<tokio::sync::oneshot::Sender<SystemStats>>,
5555
) {
56+
let config = load_config();
57+
if config.is_err() {
58+
return;
59+
}
60+
let config = config.unwrap();
61+
if config.long_term_stats.gather_stats == false {
62+
return;
63+
}
64+
if config.long_term_stats.license_key.is_none() {
65+
return;
66+
}
67+
5668
let mut metrics = LtsSubmitMetrics::new();
5769
let mut lts2_needs_shaped_devices = false;
5870
// If ShapedDevices has changed, notify the stats thread

0 commit comments

Comments
 (0)