removeAllListeners when service is stopped

This commit is contained in:
nklhrstv 2022-04-23 10:31:24 +03:00
parent 3f553eb950
commit fdb7a5e6f3
2 changed files with 2 additions and 4 deletions

View file

@ -77,8 +77,7 @@ function Chromecast() {
starting = false;
onStateChanged();
if (transport !== null) {
transport.off('init', onTransportInit);
transport.off('error', onTransportError);
transport.removeAllListeners();
transport = null;
}
};

View file

@ -77,8 +77,7 @@ function Core() {
starting = false;
onStateChanged();
if (transport !== null) {
transport.off('init', onTransportInit);
transport.off('error', onTransportError);
transport.removeAllListeners();
transport = null;
}
};