From 768804117c01d3b7a80b8899cb8fae0347dfb1fc Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 28 Mar 2020 21:29:17 +0100 Subject: worker: Unload previous core before loading new --- worker/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worker/src/main.rs b/worker/src/main.rs index a014914..f35a297 100644 --- a/worker/src/main.rs +++ b/worker/src/main.rs @@ -62,6 +62,11 @@ fn main() -> io::Result<()> { } MessageBody::NewCore(_name, libfile) => { + if ccore.is_some() { + println!("Unloading current core"); + ccore = None; + } + let path = tempdir.path().join("core.so"); let res = -- cgit v1.2.3-70-g09d2