aquatic_udp: move privdrop code to crate root, use in glommio impl

This commit is contained in:
Joakim Frostegård 2021-10-23 15:18:05 +02:00
parent eafb88c345
commit 0e58347ac4
4 changed files with 47 additions and 30 deletions

View file

@ -5,6 +5,7 @@ use glommio::channels::channel_mesh::MeshBuilder;
use glommio::prelude::*;
use crate::config::Config;
use crate::drop_privileges_after_socket_binding;
mod common;
pub mod handlers;
@ -87,6 +88,8 @@ pub fn run(config: Config) -> anyhow::Result<()> {
executors.push(executor);
}
drop_privileges_after_socket_binding(&config, num_bound_sockets).unwrap();
for executor in executors {
executor
.expect("failed to spawn local executor")