signalk-polar-performance-plugin 0.0.39 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin/index.js +9 -11
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -88,7 +88,6 @@ module.exports = function (app) {
|
|
|
88
88
|
plugin.start = function (options, restartPlugin) {
|
|
89
89
|
// Here we put our plugin logic
|
|
90
90
|
app.debug('Plugin started');
|
|
91
|
-
var unsubscribes = [];
|
|
92
91
|
app.debug('Options: %s', JSON.stringify(options))
|
|
93
92
|
|
|
94
93
|
// Load polar table
|
|
@@ -728,16 +727,15 @@ module.exports = function (app) {
|
|
|
728
727
|
|
|
729
728
|
plugin.stop = function () {
|
|
730
729
|
// Here we put logic we need when the plugin stops
|
|
731
|
-
app.debug('Plugin stopped')
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
};
|
|
730
|
+
app.debug('Plugin stopped')
|
|
731
|
+
app.debug('unsubscribes before: %s', JSON.stringify(unsubscribes))
|
|
732
|
+
unsubscribes.forEach(f => f())
|
|
733
|
+
unsubscribes = []
|
|
734
|
+
app.debug('unsubscribes after: %s', JSON.stringify(unsubscribes))
|
|
735
|
+
timers.forEach(timer => {
|
|
736
|
+
clearInterval(timer)
|
|
737
|
+
})
|
|
738
|
+
}
|
|
741
739
|
|
|
742
740
|
return plugin;
|
|
743
741
|
};
|