mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 01:48:13 +01:00
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:
committed by
Scott Nonnenberg
parent
95baa3e02e
commit
de63d9d71f
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user