Skip to content

Commit

Permalink
fixed bug - checking one port more when conditions are met
Browse files Browse the repository at this point in the history
  • Loading branch information
danielzzz committed Sep 29, 2010
1 parent 3019644 commit f1cf634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portchecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.getFirstAvailable = function (startPort, endPort, host, callback) {

var check = function() {
//---- return -1 if we checked all ports from the range already
currentPort>endPort && callback(-1, host);
if (currentPort>endPort) {callback(-1, host); return; };

console.log('checking :' + currentPort);
exports.isOpen(currentPort, host, onCheckPort);
Expand Down

0 comments on commit f1cf634

Please sign in to comment.