baalexander/node-portscanner — pull request #19 by thomseddon (2014-04-09 18:23:12+00:00)
Title: Use socket.destroy() not socket.end() on successful connection

When socket.end() is called, a FIN packet is sent however if the other host does not respond the socket will timeout and so this module will report 'closed'. The port is open but the other host is misbehaving.

This fix just forces the connection to be destroyed immediately and so means that a successful connection will always result in an 'open' status being reported.