Stream now ends automatically.

This commit is contained in:
Killer069 2021-11-07 15:54:21 +05:30 committed by GitHub
parent b17aef0ae9
commit 0e881ea0c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,6 +221,7 @@ export class Stream {
stream.on('end', () => {
if (end >= this.content_length) {
this.timer.destroy();
this.stream.push(null);
this.cleanup();
}
});