udp: replace PanicSentinel with loop over JoinHandles

This commit is contained in:
Joakim Frostegård 2024-01-29 21:43:49 +01:00
parent 239266ddab
commit 8f838098aa
6 changed files with 97 additions and 58 deletions

View file

@ -5,7 +5,7 @@ use std::io::Write;
use std::time::{Duration, Instant};
use anyhow::Context;
use aquatic_common::{IndexMap, PanicSentinel};
use aquatic_common::IndexMap;
use aquatic_udp_protocol::{PeerClient, PeerId};
use compact_str::CompactString;
use crossbeam_channel::Receiver;
@ -42,11 +42,10 @@ struct TemplateData {
}
pub fn run_statistics_worker(
_sentinel: PanicSentinel,
config: Config,
shared_state: State,
statistics_receiver: Receiver<StatisticsMessage>,
) {
) -> anyhow::Result<()> {
let process_peer_client_data = {
let mut collect = config.statistics.write_html_to_file;