mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 18:55:32 +00:00
aquatic_udp: move privdrop code to crate root, use in glommio impl
This commit is contained in:
parent
eafb88c345
commit
0e58347ac4
4 changed files with 47 additions and 30 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue