tomaswolf opened a new pull request, #775: URL: https://github.com/apache/mina-sshd/pull/775
If an SFTP file copy the twin buffering in SftpOutputStreamAsync may lead to it reading from the InputStream before the last buffer has been written. If the InputStream is an SftpInputStreamAsync and has no buffered data, it may also send SFTP messages to request more data. If both streams use the same SftpClient and thus the same SSH channel, this may lead to the input stream writing its "more data" request before the output stream has completed its write, causing the WritePendingException. Fix this by ensuring that DefaultSftpClient.write() waits for the last write before doing a new write. This keeps the benefits of the twin buffer in SftpOututStreamAsync (it still can read ahead most of the time while a buffer is written) and at the same time ensures that other SFTP messages don't step on an asynchronous buffer write. -- 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