From 4e95533e857dc6e7c96b61dfaf81bfe97823472c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wala?= Date: Sat, 16 Dec 2023 16:43:46 +0100 Subject: [PATCH] Remove unnecessary comments --- src/server.rs | 5 ----- src/sniffer.rs | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/server.rs b/src/server.rs index 7787869..fe187cb 100644 --- a/src/server.rs +++ b/src/server.rs @@ -81,12 +81,7 @@ async fn client_connected(ws: WebSocket, clients: Clients, source_to_packets: Pa send_pcap_filenames(&client_id, &mut ws_tx, &source_to_packets).await; - // FIXME: something is very wrong here - // if buffer size is > 1, rx.recv always waits - // until channel's buffer is full before receiving - // might be because of blocking sniffers let (tx, mut rx) = mpsc::unbounded_channel(); - // let (tx, mut rx) = mpsc::channel(1); tokio::task::spawn(async move { while let Some(message) = rx.recv().await { diff --git a/src/sniffer.rs b/src/sniffer.rs index 2519a7b..ad8338e 100644 --- a/src/sniffer.rs +++ b/src/sniffer.rs @@ -38,7 +38,6 @@ impl PacketCodec for PacketDecoder { } // well, it's not technically a Stream... -// but we'll gonna pretend as if it was struct OfflineStream { capture: Capture, decoder: PacketDecoder, @@ -94,7 +93,6 @@ impl Sniffer { return Err(Error::DeviceUnavailable); }; - // error let Ok(capture) = capture.setnonblock() else { return Err(Error::DeviceUnavailable); };