Skip to content

Commit

Permalink
Remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Dec 16, 2023
1 parent 80e1436 commit 4e95533
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions src/sniffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<pcap::Offline>,
decoder: PacketDecoder,
Expand Down Expand Up @@ -94,7 +93,6 @@ impl Sniffer {
return Err(Error::DeviceUnavailable);
};

// error
let Ok(capture) = capture.setnonblock() else {
return Err(Error::DeviceUnavailable);
};
Expand Down

0 comments on commit 4e95533

Please sign in to comment.