|
@@ -22,7 +22,6 @@ hlsdump.version('0.0.0')
|
|
|
return parseInt(val, 0);
|
|
return parseInt(val, 0);
|
|
|
})
|
|
})
|
|
|
.option('-s, --sync', 'clock sync using stream PCR')
|
|
.option('-s, --sync', 'clock sync using stream PCR')
|
|
|
- .option('-k, --keep-connection', 'don\'t give up once connected')
|
|
|
|
|
.option('-f, --full-stream', 'fetch all stream data')
|
|
.option('-f, --full-stream', 'fetch all stream data')
|
|
|
.option('-c, --concurrent <count>', 'fetch using concurrent connections', parseInt)
|
|
.option('-c, --concurrent <count>', 'fetch using concurrent connections', parseInt)
|
|
|
.option('-a, --user-agent <string>', 'HTTP User-Agent')
|
|
.option('-a, --user-agent <string>', 'HTTP User-Agent')
|
|
@@ -76,8 +75,12 @@ r.on('readable', function() {
|
|
|
grabnext();
|
|
grabnext();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-r.on('error', function(err) {
|
|
|
|
|
- console.error('reader error', err.stack || err);
|
|
|
|
|
|
|
+r.once('index', function() {
|
|
|
|
|
+ // wait until first index is returned before attaching error listener.
|
|
|
|
|
+ // this will enable initials errors to throw
|
|
|
|
|
+ r.on('error', function(err) {
|
|
|
|
|
+ console.error('reader error', err.stack || err);
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
r.on('end', function() {
|
|
r.on('end', function() {
|