]> git.basschouten.com Git - openhab-addons.git/commit
[snmp] Fix memory leak in SNMP (#8672)
authorfab-kis <72191872+fab-kis@users.noreply.github.com>
Sat, 10 Oct 2020 17:11:24 +0000 (19:11 +0200)
committerGitHub <noreply@github.com>
Sat, 10 Oct 2020 17:11:24 +0000 (19:11 +0200)
commit54791d97d03652954e8595d4c62634401cae58d7
treed17093853e2be17f34e31318452d036a8c4d2fd2
parent6243ccb02654b4b10ab2f2fb8722cd3d54398d3a
[snmp] Fix memory leak in SNMP (#8672)

* Fix memory leak in SNMP. When receiving an async request it is placed in a pending request queue. Not canceling it leads to infinty life cycle for those requests, filling up memory.
* Test the canceling of the snmp aync request by its handler.

Signed-off-by: Falk Bauer <falk.bauer@k-is.com>
bundles/org.openhab.binding.snmp/src/main/java/org/openhab/binding/snmp/internal/SnmpTargetHandler.java
bundles/org.openhab.binding.snmp/src/test/java/org/openhab/binding/snmp/internal/SnmpTargetHandlerTest.java