From 5b58f034215d85280e181687f6906564af063545 Mon Sep 17 00:00:00 2001 From: Dennis Kehrig Date: Sun, 17 Jun 2012 18:50:50 +0200 Subject: [PATCH] Call socket.destroy() on timeout --- lib/portscanner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/portscanner.js b/lib/portscanner.js index c4ab247..ba8af1e 100644 --- a/lib/portscanner.js +++ b/lib/portscanner.js @@ -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