mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Vottner (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SSHD-669) Destroying SftpSubsystem on client disconnect will terminate external ExecutorService - preventing re-connects
Date Thu, 09 Jun 2016 13:51:21 GMT
Roman Vottner created SSHD-669:
----------------------------------

             Summary: Destroying SftpSubsystem on client disconnect will terminate external
ExecutorService - preventing re-connects
                 Key: SSHD-669
                 URL: https://issues.apache.org/jira/browse/SSHD-669
             Project: MINA SSHD
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Roman Vottner


In SftpSubsystem on performing the destroy logic (on a client disconnect f.e.), the code will
also terminate the current executor service as well. https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java#L3374-L3379

If the executor service is defined externally and injected via SftpSubsystemFactory.setExecutorService(executorService)
this will prevent re-connects from users or even fail requests issued by other users (in a
multi user scenario).

In addition to that, as SftpSubsystem's "closed" field is declared as private, a child class
of SftpSubsystem which needs to customize destroy (in order to prevent the executor shutdown)
needs to define its own "closed" field version on overwriting the parent class and copy &
paste the otherwise unneeded run-method from the parent as well. Please, change the scope
of "closed" to protected or privide a getter in the Subsystem to retrieve the current state.

I've tested this only with 1.2.0 yet



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message