diff options
Diffstat (limited to 'lib/torrent.js')
-rw-r--r-- | lib/torrent.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 0275d70..6b58f77 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -796,7 +796,8 @@ Torrent.prototype._updateWire = function (wire) { function validateWire () { if (wire.requests.length) return - for (var i = self._selections.length; i--;) { + var i = self._selections.length + while (i--) { var next = self._selections[i] var piece if (self.strategy === 'rarest') { |