mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic: create new socket for each worker thread, don't clone one
This is the point of SO_REUSEPORT.
This commit is contained in:
parent
74e3a51fbe
commit
f348013abb
1 changed files with 1 additions and 2 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue