diff --git a/src/flow/mod.rs b/src/flow/mod.rs index afc4899c4..50cc415f1 100644 --- a/src/flow/mod.rs +++ b/src/flow/mod.rs @@ -9,12 +9,11 @@ use std::net::SocketAddr; use std::sync::{Arc, Mutex}; use std::sync::mpsc; use std::net::IpAddr; - -use mio::net::TcpListener; - use std::time; use std::fmt; +use mio::net::TcpListener; + use slog; use petgraph; use petgraph::visit::Bfs; @@ -305,9 +304,13 @@ impl Blender { .map(|&(_input, ref node)| node.domain()) .collect::>(); - for index in indices { + for index in indices.clone() { let domain = self.domains.get_mut(&index).unwrap(); domain.send(box payload::Packet::StartRecovery).unwrap(); + } + + for index in indices { + let domain = self.domains.get_mut(&index).unwrap(); domain.wait_for_ack().unwrap(); } }