mirror of
https://github.com/actix/actix-web.git
synced 2024-10-21 17:33:59 +00:00
check number of available workers
This commit is contained in:
parent
52b3b0c362
commit
b15b5e5246
1 changed files with 5 additions and 0 deletions
|
@ -744,6 +744,11 @@ fn start_accept_thread(
|
||||||
workers[next].0, info.clone()));
|
workers[next].0, info.clone()));
|
||||||
msg = err.into_inner();
|
msg = err.into_inner();
|
||||||
workers.swap_remove(next);
|
workers.swap_remove(next);
|
||||||
|
if workers.is_empty() {
|
||||||
|
break
|
||||||
|
} else if workers.len() <= next {
|
||||||
|
next = 0;
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue