Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-1310

SftpFileSystem.close() method, closes the session as well.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.10.1, 2.11.0
    • None

    Description

      SftpFileSystem.close() method, closes the session as well. 

      We expect only the sftpfilesystem channel to be closed.  Since we use the same session for multiple operations (exec command, SFTP download & upload, SFTP client list directory). 

       

      SftpFileSystem.java 

          public void close() throws IOException {
              if (this.isOpen()) {
                  SftpFileSystemProvider provider = this.provider();
                  String fsId = this.getId();
                  SftpFileSystem fs = provider.removeFileSystem(fsId);
                  ClientSession session = this.getClientSession();
                  session.close(true);
                  if (fs != null && fs != this)

      {                 throw new FileSystemException(fsId, fsId, "Mismatched FS instance for id=" + fsId);             }

              }

          }

       

       

      can you please check and let us know, if this can be fixed  ?  

      Attachments

        Issue Links

          Activity

            People

              twolf Thomas Wolf
              tilden18@gmail.com Tilden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: