diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-20 21:19:53 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-20 21:19:53 +0200 |
commit | 9cef264581ec8cf859113234b29ad5b58577ed8c (patch) | |
tree | 55320a3a619805b643e46d41068ceefe1628b0df /src/main.rs | |
parent | Removed platform mod (diff) | |
download | wireguard-rs-9cef264581ec8cf859113234b29ad5b58577ed8c.tar.xz wireguard-rs-9cef264581ec8cf859113234b29ad5b58577ed8c.zip |
Ensure peer threads are stopped on drop
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index aa73fd2..eab4b61 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,8 @@ fn main() { sodiumoxide::init().unwrap(); let mut router = router::Device::new(8); - - let peer = router.new_peer(); + { + let peer = router.new_peer(); + } + loop {} } |