Target's timeout setting ignored in snmp4j 3.2.0

Hello!

SNMP4J version 3.2.0 seems to ignore target’s custom timeout setting both for UserTarget and CommunityTarget.
Probably it’s due to these classes #duplicate method called in Snmp.PendingRequest#constructor is not copying retries/timeout fields to replica objects. These fields are instead set to defaults provided by the AbstractTarget class (retries = 0, timeout = 1000 ms). Later
Snmp.PendingRequest#pduHandleAssigned method uses these fields from replica instances to calculate a retry timeout (Snmp.java lines 1766-1769).
Target’s version field probably should be replicated too because it’s used in Snmp.PendingRequest#discoverContextEngineID.
Currently in replica targets it’s always set to AbstractTarget’s default (SnmpConstants.version3).

Hi Boris,

Thank you for reporting this bug. I have already fixed it with a 3.2.1-SNAPSHOT release, but in this build a unit test is now failing. Maybe the test is broken too, or some other side effect now occurs. I have to investigate this further.
The fix (release 3.2.1) should be available not later than next Monday in any case.

Best regards
Frank

SNMP4J 3.2.1 has been released. The unit tests have been fixed (too small timeout values).