title: ChannelSftp.put method gets stuck when using input stream from ChannelSftp.get
body: <p><br >
  My scenario is: <br >
  I'm using <strong>Jsch</strong> lib(v - 0.1.54), to work with <strong>SFTP</strong><br >
  Everything works fines except when I try to use <strong>sftpChannel.put()</strong> method, it uploads the file but the process get stuck</p>
  
  <p>Code:</p>
  
  <pre><code>public static void moveFiles() {
      //some code
       try {
             InputStream fis =  sftpChannel.get(currentDirectory+"/"+fileName);
  
             sftpChannel.put(fis, fileName,  ChannelSftp.RESUME);//"freezes here, no exception is thrown
  
             fis.close();
           } catch(Exception e){
              e.printStackTrace();
           }
      //some other code
  }
  </code></pre>
  
  <p>I've checked if there's already any other issue like that one I'm facing but there's is no solution to it(apparently)</p>
  
  <p><a href="https://stackoverflow.com/questions/36026454/sftp-channelsftp-put-stop-its-execution-process-but-successfully-being-uploaded">Same issue</a></p>
  
  <p>Thanks in advance o/</p>