diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-03-28 21:29:17 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-03-28 21:30:41 +0100 |
commit | 768804117c01d3b7a80b8899cb8fae0347dfb1fc (patch) | |
tree | de090bf5d48ba32b292797a2bb9a1a000508e217 /worker | |
parent | bf4622348beb02d6b2508db96213943335bbfa62 (diff) |
worker: Unload previous core before loading new
Diffstat (limited to 'worker')
-rw-r--r-- | worker/src/main.rs | 5 |
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 = |