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)
if not status then
sock:close()
return status, err
end