Skip to content

Commit 74af9a6

Browse files
committed
use standard finish event instead of source's end event
1 parent daa630b commit 74af9a6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

speech-to-text/timing-stream.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ function TimingStream(opts) {
3838
this.sourceEnded = false;
3939

4040
var self = this;
41-
this.on('pipe', function(source) {
42-
source.on('end', function() {
43-
self.sourceEnded = true; // todo: see if there's anything built-in that does this for us
44-
self.checkForEnd();
45-
});
41+
this.on('finish', function() {
42+
self.sourceEnded = true; // todo: see if there's anything built-in that does this for us
43+
self.checkForEnd();
4644
});
4745
}
4846
util.inherits(TimingStream, Duplex);

0 commit comments

Comments
 (0)