fix(tracker): move worker stop to the end of stop func

This commit is contained in:
sylenien 2022-06-22 12:24:07 +02:00
parent 845cf64e44
commit 0a66b23613

View file

@ -452,15 +452,15 @@ export default class App {
stop(): void {
if (this.activityState !== ActivityState.NotActive) {
try {
if (this.worker) {
this.worker.postMessage("stop")
}
this.sanitizer.clear()
this.observer.disconnect()
this.nodes.clear()
this.ticker.stop()
this.stopCallbacks.forEach((cb) => cb())
this.notify.log("OpenReplay tracking stopped.")
if (this.worker) {
this.worker.postMessage("stop")
}
} finally {
this.activityState = ActivityState.NotActive
}