Преглед изворни кода

don't unhook the stream

it caused a bad connection to take really long to recover from
Gil Pedersen пре 12 година
родитељ
комит
df7fb1e5ee
1 измењених фајлова са 1 додато и 12 уклоњено
  1. 1 12
      bin/hlsdump

+ 1 - 12
bin/hlsdump

@@ -123,11 +123,8 @@ function hook(stream) {
     smooth.on('unpipe', function() {
       this.unpipe();
     });
-    smooth.once('error', function(err) {
+    smooth.on('error', function(err) {
       console.error('smooth error', err);
-      unhook(stream);
-
-      smooth.on('error', function () {});
     });
     s = s.pipe(smooth);
   }
@@ -139,13 +136,5 @@ function hook(stream) {
   hooked = true;
 }
 
-function unhook(stream) {
-  if (hooked) {
-    console.error('unhooking output');
-    stream.unpipe();
-    hooked = false;
-  }
-}
-
 if (!hlsdump.sync)
   hook(buffer);