You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2022/12/19 22:48:19 UTC
[GitHub] [mina-sshd] tomaswolf opened a new pull request, #295: GH-294: Fix memory leaks in SftpFileSystemProvider
tomaswolf opened a new pull request, #295:
URL: https://github.com/apache/mina-sshd/pull/295
SftpFileSystem.getClient() returns reference-counted wrapper instances that need to be closed to avoid a memory leak via ThreadLocals. Make sure that the streams returned by SftpFileSystemProvider.newInputStream() and newOutputStream() do close the client used by ensuring that the streams returned by SftpFileSystem.read() and write() do so. Also fix SftpFileSystemProvider.copy() to close the SftpClient it uses.
SftpFileSystemProvider.newDirectoryStream() and newFileChannel() already do close the SftpClient used.
Fix the SftpFileSystemTest to properly close SftpClients and DirectoryStreams.
Fixes #294.
--
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #295: GH-294: Fix memory leaks in SftpFileSystemProvider
Posted by GitBox <gi...@apache.org>.
tomaswolf commented on code in PR #295:
URL: https://github.com/apache/mina-sshd/pull/295#discussion_r1053561160
##########
sshd-sftp/src/test/java/org/apache/sshd/sftp/client/fs/SftpFileSystemTest.java:
##########
@@ -87,6 +89,7 @@
import org.junit.runners.MethodSorters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testcontainers.shaded.org.apache.commons.io.output.ByteArrayOutputStream;
Review Comment:
Fixed.
--
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf merged pull request #295: GH-294: Fix memory leaks in SftpFileSystemProvider
Posted by GitBox <gi...@apache.org>.
tomaswolf merged PR #295:
URL: https://github.com/apache/mina-sshd/pull/295
--
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #295: GH-294: Fix memory leaks in SftpFileSystemProvider
Posted by GitBox <gi...@apache.org>.
tomaswolf commented on code in PR #295:
URL: https://github.com/apache/mina-sshd/pull/295#discussion_r1053192599
##########
sshd-sftp/src/test/java/org/apache/sshd/sftp/client/fs/SftpFileSystemTest.java:
##########
@@ -87,6 +89,7 @@
import org.junit.runners.MethodSorters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testcontainers.shaded.org.apache.commons.io.output.ByteArrayOutputStream;
Review Comment:
Wrong import.
--
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org