mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Close socket when connect fails. Possibly related to #1245
This commit is contained in:
parent
1f3c083c25
commit
8bca8af23e
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue