Skip to content

Commit 6f50ef5

Browse files
committed
Land rapid7#3935 - Fix SNMP scanners on OS X/FreeBSD
2 parents 6d7870a + 7861b17 commit 6f50ef5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/snmp/manager.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ def send(data, host, port, flags = 0)
6262
@socket.sendto(data, host, port, flags)
6363
rescue NoMethodError
6464
@socket.send(data, 0, host, port)
65+
rescue ::Errno::EISCONN
66+
@socket.write(data)
6567
end
66-
6768
end
6869

6970
def recv(max_bytes)

0 commit comments

Comments
 (0)