Skip to content

Commit

Permalink
Call socket.destroy() on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisKehrig committed Jun 17, 2012
1 parent 45028c6 commit 5b58f03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/portscanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ portscanner.checkPortStatus = function(port, host, callback) {
socket.setTimeout(400)
socket.on('timeout', function() {
status = 'closed'
socket.destroy()
})

// Assuming the port is not open if an error. May need to refine based on
Expand Down

0 comments on commit 5b58f03

Please sign in to comment.