Skip to content

Commit

Permalink
Quits scanning ports when a matching port has been found.
Browse files Browse the repository at this point in the history
  • Loading branch information
baalexander committed Aug 29, 2011
1 parent 24224b8 commit bb0356a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/portscanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function findAPortWithStatus(status, startPort, endPort, host, callback) {
})
}

for (var port = startPort; port <= endPort; port++) {
for (var port = startPort; port <= endPort && foundPort === false; port++) {
check(port)
}
}
Expand Down

0 comments on commit bb0356a

Please sign in to comment.