aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 0cf7ae6..e9dbe82 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -125,11 +125,8 @@ fn main() {
wg.add_tun_reader(reader);
}
- // obtain handle for waiting
- let wait = wg.wait();
-
// wrap in configuration interface
- let cfg = configuration::WireguardConfig::new(wg);
+ let cfg = configuration::WireguardConfig::new(wg.clone());
// start Tun event thread
{
@@ -187,6 +184,6 @@ fn main() {
});
// block until all tun readers closed
- wait.wait();
+ wg.wait();
profiler_stop();
}