This commit is contained in:
Øsystems 2020-01-21 15:02:49 +10:00
parent 6f202ae3b5
commit 5096ade2ab
1 changed files with 8 additions and 6 deletions

View File

@ -263,12 +263,14 @@ impl ServerBuilder {
info!("Starting {} workers", self.threads); info!("Starting {} workers", self.threads);
// start workers // start workers
let workers = (0..self.threads).map(|idx| { let workers = (0..self.threads)
let worker = self.start_worker(idx, self.accept.get_notify()); .map(|idx| {
self.workers.push((idx, worker.clone())); let worker = self.start_worker(idx, self.accept.get_notify());
self.workers.push((idx, worker.clone()));
worker worker
}).collect(); })
.collect();
// start accept thread // start accept thread
for sock in &self.sockets { for sock in &self.sockets {
@ -380,7 +382,7 @@ impl ServerBuilder {
.await; .await;
System::current().stop(); System::current().stop();
} }
.boxed(), .boxed(),
); );
} }
ready(()) ready(())