You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ad...@apache.org on 2003/06/24 12:36:31 UTC
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/sftp SftpFileSystem.java
adammurdoch 2003/06/24 03:36:30
Modified: vfs/src/java/org/apache/commons/vfs/provider/sftp
SftpFileSystem.java
Log:
Disconnect the SSH session when closing the file system.
Patch submitted by Steve ?
Revision Changes Path
1.3 +13 -1 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java
Index: SftpFileSystem.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/sftp/SftpFileSystem.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SftpFileSystem.java 17 Mar 2003 09:04:14 -0000 1.2
+++ SftpFileSystem.java 24 Jun 2003 10:36:30 -0000 1.3
@@ -91,6 +91,18 @@
}
/**
+ * Closes this file system.
+ */
+ public void close()
+ {
+ if ( session != null )
+ {
+ session.disconnect();
+ }
+ super.close();
+ }
+
+ /**
* Returns an SFTP channel to the server.
*/
protected ChannelSftp getChannel() throws IOException
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org