Преглед на файлове

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);