lgoldstein commented on a change in pull request #134:
URL: https://github.com/apache/mina-sshd/pull/134#discussion_r427399422
##########
File path:
sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/impl/AbstractSftpClient.java
##########
@@ -1308,6 +1308,9 @@ public FileChannel openRemoteFileChannel(String path,
Collection<OpenMode> modes
@Override
public InputStream read(String path, int bufferSize, Collection<OpenMode>
mode) throws IOException {
+ if (bufferSize <= 0) {
+ bufferSize = (int)
getClientChannel().getLocalWindow().getPacketSize() - 13;
Review comment:
Can we write a short comment why `-13`
##########
File path:
sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/impl/AbstractSftpClient.java
##########
@@ -1329,6 +1332,9 @@ public InputStream read(String path, Collection<OpenMode>
mode) throws IOExcepti
@Override
public OutputStream write(String path, int bufferSize,
Collection<OpenMode> mode) throws IOException {
+ if (bufferSize <= 0) {
+ bufferSize = (int)
getClientChannel().getRemoteWindow().getPacketSize() - 13;
Review comment:
Can we write a short comment why -13
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]