1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Close socket when connect fails. Possibly related to #1245

This commit is contained in:
dmiller
2018-08-23 02:58:39 +00:00
parent 1f3c083c25
commit 8bca8af23e

View File

@@ -75,6 +75,7 @@ local setup_connect = function(host, port, opts)
local status, err = sock:connect(host, port, opts.proto) local status, err = sock:connect(host, port, opts.proto)
if not status then if not status then
sock:close()
return status, err return status, err
end end