You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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