jbonofre opened a new pull request, #2514:
URL: https://github.com/apache/karaf/pull/2514

   ## Summary
   - Fix #2513
   - `ShellCommand.destroy()` was empty — when an SSH session closes or times 
out while `log:tail` is running, the command thread stays blocked on `wait()` 
indefinitely, leaking a thread on every reconnect
   - Store the Karaf session and command thread as fields, and clean them up in 
`destroy()` by closing the session and interrupting the thread (mirroring what 
`ShellFactoryImpl` already does for interactive shells)
   - Add unit test verifying that a blocking command is properly interrupted 
when `destroy()` is called
   
   ## Test plan
   - [x] New `ShellCommandTest.testDestroyInterruptsBlockingCommand` passes
   - [x] All existing `shell/ssh` tests pass
   - [ ] Manual: SSH into Karaf, run `log:tail`, disconnect, verify no 
lingering thread via `shell:threads | grep log:tail`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to