forked from M-Labs/artiq
firmware: stop profiler before rebooting too.
This commit is contained in:
parent
9dc7efefe4
commit
68ef09ed73
|
@ -129,17 +129,21 @@ fn worker(io: &Io, stream: &mut TcpStream) -> io::Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Request::Hotswap(firmware) => {
|
Request::Hotswap(firmware) => {
|
||||||
profiler::stop();
|
|
||||||
warn!("hotswapping firmware");
|
|
||||||
Reply::RebootImminent.write_to(stream)?;
|
Reply::RebootImminent.write_to(stream)?;
|
||||||
stream.close()?;
|
stream.close()?;
|
||||||
stream.flush()?;
|
stream.flush()?;
|
||||||
|
|
||||||
|
profiler::stop();
|
||||||
|
warn!("hotswapping firmware");
|
||||||
unsafe { boot::hotswap(&firmware) }
|
unsafe { boot::hotswap(&firmware) }
|
||||||
}
|
}
|
||||||
|
|
||||||
Request::Reboot => {
|
Request::Reboot => {
|
||||||
Reply::RebootImminent.write_to(stream)?;
|
Reply::RebootImminent.write_to(stream)?;
|
||||||
stream.close()?;
|
stream.close()?;
|
||||||
|
stream.flush()?;
|
||||||
|
|
||||||
|
profiler::stop();
|
||||||
warn!("restarting");
|
warn!("restarting");
|
||||||
unsafe { boot::reset() }
|
unsafe { boot::reset() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue