Unverified Commit b8e07f15 authored by Roman Zeyde's avatar Roman Zeyde
Browse files

Correct RPC shutdown logging

parent b9c778f0
......@@ -485,13 +485,14 @@ impl RPC {
info!("[{}] disconnected peer", addr);
}));
}
info!("stopping RPC server");
trace!("closing RPC connections");
for sender in senders.lock().unwrap().iter() {
let _ = sender.send(Message::Done);
}
for child in children {
let _ = child.join();
}
trace!("RPC connections are closed");
})),
};
handle
......@@ -504,7 +505,9 @@ impl RPC {
impl Drop for RPC {
fn drop(&mut self) {
trace!("stop accepting new RPCs");
self.notification.send(Notification::Exit).unwrap();
self.server.take().map(|t| t.join().unwrap());
trace!("RPC server is stopped");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment