tomaswolf commented on issue #371: URL: https://github.com/apache/mina-sshd/issues/371#issuecomment-1555293276
Maybe it would help if you closed the various client-side objects you use. An `SftpClient` is supposed to be closed when it is no longer needed. But yes, there is a problem here. The `SftpFileSystem` uses a pool of `SftpClient`s and uses separate clients per thread. This is a questionable architecture, especially since these `SftpClient`s remain open (and I think, if used like in your last example, will even prevent them from being re-used). Each `SftpClient` is an SSH channel, which thus remains open, and thus the server-side `SftpSubsystem`s don't exit. A per-channel timeout on the server side could mitigate this (and other cases where clients don't properly close their `SftpClient`s), but ultimately I think it is necessary to re-think the `SftpFileSystem` implementation such that it works without per-thread channels, and without `ThreadLocal`s. -- 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: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org