Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
Exit if no knock listener was bound
Browse files Browse the repository at this point in the history
  • Loading branch information
jennamagius committed Jun 25, 2018
1 parent d68cd8a commit 712e71f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ impl Server {
}
}

if self.i.knock4_listener.borrow().is_none() && self.i.knock6_listener.borrow().is_none() {
error!("Failed to bind knock listener");
::std::process::exit(1);
}

let proxy = self.clone();
transportation::set_signal_handler(Rc::new(move || proxy.harvest_children()));
}
Expand Down

0 comments on commit 712e71f

Please sign in to comment.