Skip to content

Commit

Permalink
Merge pull request #19 from thomseddon/fix-end
Browse files Browse the repository at this point in the history
Use socket.destroy() not socket.end() on successful connection
  • Loading branch information
EndangeredMassa committed Apr 10, 2014
2 parents c747ffa + a854ec6 commit 5526b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/portscanner.js
Expand Up @@ -72,7 +72,7 @@ portscanner.checkPortStatus = function(port, options, callback) {
// Socket connection established, port is open
socket.on('connect', function() {
status = 'open'
socket.end()
socket.destroy()
})

// If no response, assume port is not listening
Expand Down

0 comments on commit 5526b8b

Please sign in to comment.