Skip to content

Commit

Permalink
Merge pull request #134 from teambition/master
Browse files Browse the repository at this point in the history
Floating-point durations to setTimeout may cause infinite loop
  • Loading branch information
tj committed Sep 9, 2014
2 parents 624e07e + 68a23ca commit 5ac2ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sockets/sock.js
Expand Up @@ -277,7 +277,7 @@ Socket.prototype.connect = function(port, host, fn){
self.emit('reconnect attempt');
sock.destroy();
self.connect(port, host);
self.retry = Math.min(max, retry * 1.5);
self.retry = Math.round(Math.min(max, retry * 1.5));
}, retry);
});

Expand Down

0 comments on commit 5ac2ab5

Please sign in to comment.