Explorar el Código

remember offset when checking for partial errors

Gil Pedersen hace 13 años
padre
commit
207136e53b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/uristream.js

+ 1 - 1
lib/uristream.js

@@ -87,7 +87,7 @@ function setupHttp(uri, options, dst) {
       req.abort();
       if (--tries <= 0) {
         // remap error to partial error if we have received any data
-        if (start + accum !== 0)
+        if (start - offset + accum !== 0)
           err = new PartialError(err, start - offset + accum, (size !== -1) ? start - offset + size : size);
         return dst.emit('error', err);
       }