(zkClient) how to close zk connection? #61786
Unanswered
OrangeJam-zon
asked this question in
Profile
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
As shown in the above figure, I tried to close the connection in the listener function when it is in a Disconnected state. However, calling the close() method throws an InterruptedException. The code that throws the exception is as follows.
When an exception is thrown, the function returns directly, preventing it from reaching the subsequent close method and causing it to fail to close. Additionally, it is not possible to catch this exception externally because the zkClient internally has a thread that catches the exception.
so, how can I do to close it in the listener function?
please, help me. thanks
Beta Was this translation helpful? Give feedback.
All reactions