mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
free core instance on stop core service
This commit is contained in:
parent
cbd0f7a337
commit
1edf6484d8
2 changed files with 8 additions and 1 deletions
|
|
@ -93,7 +93,11 @@ function Core() {
|
|||
active = false;
|
||||
error = null;
|
||||
starting = false;
|
||||
transport = null;
|
||||
if (transport !== null) {
|
||||
transport.free();
|
||||
transport = null;
|
||||
}
|
||||
|
||||
onStateChanged();
|
||||
};
|
||||
this.on = function(name, listener) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ function CoreTransport() {
|
|||
this.getState = function(model) {
|
||||
return core.get_state(model);
|
||||
};
|
||||
this.free = function() {
|
||||
core.free();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = CoreTransport;
|
||||
|
|
|
|||
Loading…
Reference in a new issue