Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
OSGi
Description
Each ChannelSession creates its own thread to pump the data streams. Currently, the only action it takes to stop this thread on doClose() is to interrupt the thread. This isn't sufficient, and this is well known as evidenced by this comment:
// Interrupt does not really work and the thread will only exit when
// the call to read() will return. So ensure this thread is a daemon
// to avoid blocking the whole app
streamPumper.setDaemon(true);
Unfortunately, that's only a solution in simple applications. When you have a plug-in architecture like OSGi where bundles come and go, this causes severe leaks as the threads are never cleaned up, even after you've closed the sessions.
Attachments
Issue Links
- is related to
-
SSHD-136 Reduce consumption of ClientInputStreamPump threads and NioProcessor threads.
- Resolved