mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Close socket when connect fails. Possibly related to #1245
This commit is contained in:
@@ -75,6 +75,7 @@ local setup_connect = function(host, port, opts)
|
||||
local status, err = sock:connect(host, port, opts.proto)
|
||||
|
||||
if not status then
|
||||
sock:close()
|
||||
return status, err
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user