From 68ef09ed73aa9bea058178d5488b5ffdc48bcd74 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 5 May 2018 01:52:44 +0000 Subject: [PATCH] firmware: stop profiler before rebooting too. --- artiq/firmware/runtime/mgmt.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/runtime/mgmt.rs b/artiq/firmware/runtime/mgmt.rs index 70c64be70..3c14e776e 100644 --- a/artiq/firmware/runtime/mgmt.rs +++ b/artiq/firmware/runtime/mgmt.rs @@ -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() } }