soulwing / tnm4j

A simplified SNMP API for Java, based on Jürgen Schönwälder's Tnm extension for Tcl.
GNU General Public License v3.0
41 stars 18 forks source link

asyncwalk keeps retrying on TimeoutException #11

Closed scarr closed 3 years ago

scarr commented 5 years ago

When performing an asyncwalk and the host does not respond and the response.get() throws a timeoutexception, the host is retried indefinitely even if the TimeoutException is handled.

ceharris commented 5 years ago

This is a known issue, which I'd completely forgotten about. There's a FIXME marked around line 103 of AbstractAsyncWalker. We invoke the callback in a separate thread from the one that is driving the walk. In that separate thread, we need to allow the callback to throw an exception that would be caught and would be used to signal to the thread driving the walk that it should bail out. Shouldn't be too awfully hard; it was just overlooked in the current implementation.

ceharris commented 3 years ago

fixed in 24c98dc

will be included in release 1.0.11