mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Extend snmp timeout
Default is 1 second, bump to 2 seconds for some extraordinarily slow switches. This changes overall to about 10 seconds as there are, by default, 5 retries.
This commit is contained in:
parent
e52a9ff70f
commit
a0ca3d3122
@ -33,9 +33,9 @@ def _get_transport(name):
|
||||
# Annoyingly, pysnmp does not automatically determine ipv6 v ipv4
|
||||
res = getaddrinfo(name, 161, 0, socket.SOCK_DGRAM)
|
||||
if res[0][0] == socket.AF_INET6:
|
||||
return snmp.Udp6TransportTarget(res[0][4])
|
||||
return snmp.Udp6TransportTarget(res[0][4], 2)
|
||||
else:
|
||||
return snmp.UdpTransportTarget(res[0][4])
|
||||
return snmp.UdpTransportTarget(res[0][4], 2)
|
||||
|
||||
|
||||
class Session(object):
|
||||
|
Loading…
Reference in New Issue
Block a user