mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
Merge remote-tracking branch 'core/master' into new-crate
This commit is contained in:
commit
9c16d47632
@ -62,9 +62,10 @@ fn main() {
|
||||
}
|
||||
let mut next = 0;
|
||||
for socket in listener.incoming() {
|
||||
let socket = socket.expect("failed to accept");
|
||||
channels[next].unbounded_send(socket).expect("worker thread died");
|
||||
next = (next + 1) % channels.len();
|
||||
if let Ok(socket) = socket {
|
||||
channels[next].unbounded_send(socket).expect("worker thread died");
|
||||
next = (next + 1) % channels.len();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user