aboutsummaryrefslogtreecommitdiff
path: root/worker
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-03-28 21:29:17 +0100
committerTom Smeding <tom.smeding@gmail.com>2020-03-28 21:30:41 +0100
commit768804117c01d3b7a80b8899cb8fae0347dfb1fc (patch)
treede090bf5d48ba32b292797a2bb9a1a000508e217 /worker
parentbf4622348beb02d6b2508db96213943335bbfa62 (diff)
worker: Unload previous core before loading new
Diffstat (limited to 'worker')
-rw-r--r--worker/src/main.rs5
1 files changed, 5 insertions, 0 deletions
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 =