From 84214ab0d1bd1c04ae61faec1d13899b936a6739 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 6 Oct 2016 12:55:19 +0000 Subject: [PATCH] Rust: don't panic when loading a kernel twice in same session. --- artiq/runtime.rs/src/session.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/runtime.rs/src/session.rs b/artiq/runtime.rs/src/session.rs index 0cb6fb7e5..a2e98d904 100644 --- a/artiq/runtime.rs/src/session.rs +++ b/artiq/runtime.rs/src/session.rs @@ -351,7 +351,10 @@ fn process_kern_message(waiter: Waiter, kern::RunFinished => { try!(kern_acknowledge()); + + kernel::stop(); session.kernel_state = KernelState::Absent; + return Ok(true) }