Closed smulikHakipod closed 8 years ago
Interesting - do you think this might be related to #31?
I'm seeing a number of strange issues, so it might be all related.
Further investigation shows that every thread other than ZToolPacketParser thread (the cluster listener thread) is working fine.
Hi
I suspect that invoking any ZigBee stack request response messaging from ZToolPacketParser thread will cause deadlock as your ZToolPacketParser thread will be waiting for response instead of parsing the response packet. We could add check for this somewhere in the ZigBeeApi and throw exception with appropriate error message. Another alternative would be to have another thread for invoking cluster listeners. What do you think?
Best regards, Tommi
I put the notifyClusterListener function in a new thread and everything is working fine. https://github.com/smulikHakipod/zigbee4java/commit/45336411bb7e24d34ddeb26b862ceb23e3d10d4c
Hey, I noticed something strange, if I listen for cluster messages, process them and invoking command in response I get timeout issues. If I invoke the response on the main thread instead of the ClusterListener thread its working fine. Debugging the issue I saw that zigbee4java got the response.. its just some threading issue. Am I missing something? Anyone have an Idea how to fix the issue?