Sfoglia il codice sorgente

call destroy() on the actual stream

Gil Pedersen 13 anni fa
parent
commit
90606635de
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      lib/reader.js

+ 2 - 1
lib/reader.js

@@ -273,10 +273,11 @@ function HlsStreamReader(src, options) {
     if (!stream) return;
 
     if (typeof stream.destroy == 'function') {
+      debug('timed out waiting for data');
       var duration = self.readState.currentSegment.duration || self.index.target_duration || 10;
       self.readState.timer = setTimeout(function() {
         if (self.readState.stream)
-          stream.destroy();
+          self.readState.stream.destroy();
         self.readState.timer = null;
       }, 1.5*duration*1000);
     }