aquatic: create new socket for each worker thread, don't clone one

This is the point of SO_REUSEPORT.
This commit is contained in:
Joakim Frostegård 2020-04-07 14:09:29 +02:00
parent 74e3a51fbe
commit f348013abb

View file

@ -14,10 +14,9 @@ use common::State;
pub fn run(){
let config = Config::default();
let state = State::new();
let socket = network::create_socket(&config);
for i in 0..config.num_threads {
let socket = socket.try_clone().unwrap();
let socket = network::create_socket(&config);
let state = state.clone();
let config = config.clone();