aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/router
diff options
context:
space:
mode:
Diffstat (limited to 'src/wireguard/router')
-rw-r--r--src/wireguard/router/device.rs2
-rw-r--r--src/wireguard/router/peer.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wireguard/router/device.rs b/src/wireguard/router/device.rs
index f903a8e..6c59491 100644
--- a/src/wireguard/router/device.rs
+++ b/src/wireguard/router/device.rs
@@ -142,7 +142,7 @@ impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> DeviceHandle<
};
// start worker threads
- let mut threads = Vec::with_capacity(num_workers);
+ let mut threads = Vec::with_capacity(4 * num_workers);
// inbound/decryption workers
for _ in 0..num_workers {
diff --git a/src/wireguard/router/peer.rs b/src/wireguard/router/peer.rs
index b8110f0..8fe2e1c 100644
--- a/src/wireguard/router/peer.rs
+++ b/src/wireguard/router/peer.rs
@@ -204,7 +204,7 @@ impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> PeerInner<E,
debug!("peer.send");
// send to endpoint (if known)
- match self.endpoint.lock().as_ref() {
+ match self.endpoint.lock().as_mut() {
Some(endpoint) => {
let outbound = self.device.outbound.read();
if outbound.0 {