Skip to content

Commit 29f0dbe

Browse files
committed
Use WriteStream.end again
1 parent 58027f3 commit 29f0dbe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* `newFilename` should be overriden in subclass so it is no argument for
66
constructor anymore.
7+
* `_final` calls rather `stream.end` than `close` because of callback.
78

89
## v1.2.0 2018-09-12
910

src/file-timestamp-stream.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ export class FileTimestampStream extends Writable {
7575

7676
_final (callback: (error?: Error | null) => void): void {
7777
if (this.stream) {
78-
this.stream.close()
78+
this.stream.end(callback)
79+
} else {
80+
callback()
7981
}
80-
callback()
8182
}
8283

8384
_destroy (error: Error | null, callback: (error: Error | null) => void): void {

0 commit comments

Comments
 (0)