Explorar el Código

don't use recursive loop

Gil Pedersen hace 12 años
padre
commit
592184eb62
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/tssmooth.js

+ 1 - 1
lib/tssmooth.js

@@ -186,7 +186,7 @@ TsSmooth.prototype._transform = function(chunk, encoding, cb) {
           waittime = 0;
         } else if (error < -self.error_limit) {
           // ignore the data since it is too late
-          return processNext();
+          return setImmediate(processNext);
         }
 
         return wait(waittime, function output() {