mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 20:51:30 +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)
|
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user