2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

firmware: stop profiler before rebooting too.

This commit is contained in:
whitequark 2018-05-05 01:52:44 +00:00
parent 9dc7efefe4
commit 68ef09ed73

View File

@ -129,17 +129,21 @@ fn worker(io: &Io, stream: &mut TcpStream) -> io::Result<()> {
}
Request::Hotswap(firmware) => {
profiler::stop();
warn!("hotswapping firmware");
Reply::RebootImminent.write_to(stream)?;
stream.close()?;
stream.flush()?;
profiler::stop();
warn!("hotswapping firmware");
unsafe { boot::hotswap(&firmware) }
}
Request::Reboot => {
Reply::RebootImminent.write_to(stream)?;
stream.close()?;
stream.flush()?;
profiler::stop();
warn!("restarting");
unsafe { boot::reset() }
}