mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Remove event listeners on stream end
This commit is contained in:
@@ -10,6 +10,8 @@ export function toWebStream(readable: Readable): ReadableStream<Buffer> {
|
||||
let controller: ReadableStreamDefaultController<Buffer>;
|
||||
|
||||
const cleanup = finished(readable, err => {
|
||||
cleanup();
|
||||
|
||||
if (err != null) {
|
||||
return controller.error(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user