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

SNMPContext won't close. #14

Closed MaximilianMitterrutzner closed 3 years ago

MaximilianMitterrutzner commented 3 years ago

When calling SNMPContext#close() the function will never exit. I am using Java 8 and JavaFX.

ceharris commented 3 years ago

This was due to a change in the way Snmp4j manages the underlying sockets and timeouts. Had you run the unit tests when you tried version 2.8.0, you would have noticed that the tests hang. :-)

I just fixed this in commit 8efebde. As soon as Travis CI gets around to running my build, I'll release a new version with this fix and the later version of snmp4j.

MaximilianMitterrutzner commented 3 years ago

Is there anything else I have to do locally except for changing the version to 2.8.4 and removing the repository with the id "oosnmp"? Because even with version 2.8.4 it still blocks.

ceharris commented 3 years ago

See commit 8efebde, which shows there is an additional fix needed to run with snmp4j 2.8.4.

I just released version tnm4j 1.0.10 which includes this fix along with the switch to snmp4j 2.8.4.