debug-hooks mode will exit when two things happen, there is no currently executing hook in the tmux window, and the admin client connection to zookeeper is closed. If the user closes the connection without exiting from the tmux session and a hook is currently executing, then the debug-hooks session is still active and the unit will wait on the hook to finish. Ideally we'd detect the end of the debug-session and forcibly terminate the debug-hook.
debug-hooks mode will exit when two things happen, there is no currently executing hook in the tmux window, and the admin client connection to zookeeper is closed. If the user closes the connection without exiting from the tmux session and a hook is currently executing, then the debug-hooks session is still active and the unit will wait on the hook to finish. Ideally we'd detect the end of the debug-session and forcibly terminate the debug-hook.