Fix leaking web workers when recording new audio message
See [#5250][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5250
This commit is contained in:
parent
95baa3e02e
commit
de63d9d71f
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@
|
|||
if (this.recorder.isRecording()) {
|
||||
this.recorder.cancelRecording();
|
||||
}
|
||||
|
||||
// Reach in and terminate the web worker used by WebAudioRecorder, otherwise
|
||||
// it gets leaked due to a reference cycle with its onmessage listener
|
||||
this.recorder.worker.terminate();
|
||||
this.recorder = null;
|
||||
|
||||
if (this.interval) {
|
||||
|
|
Loading…
Add table
Reference in a new issue