Close the socket when finished getting the banner.

This commit is contained in:
batrick 2009-07-01 21:43:49 +00:00
parent 971fb7551d
commit 6595577d6e

View file

@ -96,7 +96,10 @@ get_banner = function(host, port, opts)
opts = initopts(opts)
opts.recv_before = true
local socket, nothing, correct, banner = tryssl(host, port, "", opts)
if socket then return true, banner end
if socket then
socket:close()
return true, banner
end
return false, banner
end