forked from M-Labs/artiq
1
0
Fork 0

firmware: stop profiler before rebooting too.

This commit is contained in:
whitequark 2018-05-05 01:52:44 +00:00
parent 9dc7efefe4
commit 68ef09ed73
1 changed files with 6 additions and 2 deletions

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() }
}