1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Added missing error handling for connection timeouts

This commit is contained in:
patrik
2010-08-31 13:38:50 +00:00
parent 902b39517f
commit c0d92223db

View File

@@ -87,7 +87,10 @@ action = function(host, port)
try(socket:connect(host, port)) try(socket:connect(host, port))
status, tcp = snmp.snmpWalk( socket, tcp_oid ) status, tcp = snmp.snmpWalk( socket, tcp_oid )
if ( not(status) ) then return end
status, udp = snmp.snmpWalk( socket, udp_oid ) status, udp = snmp.snmpWalk( socket, udp_oid )
if ( not(status) ) then return end
socket:close() socket:close()
if ( tcp == nil ) or ( #tcp == 0 ) or ( udp==nil ) or ( #udp == 0 ) then if ( tcp == nil ) or ( #tcp == 0 ) or ( udp==nil ) or ( #udp == 0 ) then