Mark Peters created SSHD-224:
--------------------------------

             Summary: ClientInputStreamPump threads never get stopped
                 Key: SSHD-224
                 URL: https://issues.apache.org/jira/browse/SSHD-224
             Project: MINA SSHD
          Issue Type: Bug
         Environment: OSGi
            Reporter: Mark Peters


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to