diff options
Diffstat (limited to 'src/wireguard/router/device.rs')
-rw-r--r-- | src/wireguard/router/device.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wireguard/router/device.rs b/src/wireguard/router/device.rs index 8bfa261..7c90f22 100644 --- a/src/wireguard/router/device.rs +++ b/src/wireguard/router/device.rs @@ -121,14 +121,14 @@ impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> DeviceHandle< // start worker threads let mut threads = Vec::with_capacity(num_workers); while let Some(rx) = consumers.pop() { - println!("spawn"); - threads.push(thread::spawn(move || { - println!("spawned"); - worker(rx); - })); + threads.push(thread::spawn(move || worker(rx))); } debug_assert!(num_workers > 0, "zero worker threads"); - debug_assert_eq!(threads.len(), num_workers); + debug_assert_eq!( + threads.len(), + num_workers, + "workers does not match consumers" + ); // return exported device handle DeviceHandle { |