The KNXNetworkLinkIP class leaks threads in case it cannot connect:
The corresponding stacktrace:
16:03:31.705 ERROR tuwien.auto.calimero[:46] - KNXnet/IP Tunneling 10.42.0.13:3671: communication failure on connect
java.net.BindException: Can't assign requested address (Bind failed)
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
at java.net.DatagramSocket.bind(DatagramSocket.java:392)
at java.net.DatagramSocket.<init>(DatagramSocket.java:242)
at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:150)
at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.<init>(KNXnetIPTunnel.java:131)
at tuwien.auto.calimero.link.KNXNetworkLinkIP.<init>(KNXNetworkLinkIP.java:142)
...
According to what I understood, the super() constructor already spawns the EventNotifier thread and when establishing the KNXnetIPConnection fails down the road, it misses to close the notifier thread.
I observed this behavior in calimero-core 2.3, but if I'm not mistaken it hasn't change in the current master branch.
The
KNXNetworkLinkIP
class leaks threads in case it cannot connect:The corresponding stacktrace:
According to what I understood, the
super()
constructor already spawns theEventNotifier
thread and when establishing theKNXnetIPConnection
fails down the road, it misses to close the notifier thread.I observed this behavior in calimero-core 2.3, but if I'm not mistaken it hasn't change in the current master branch.