summaryrefslogtreecommitdiffstats
path: root/FTPClient.cpp
diff options
context:
space:
mode:
authorDaniel Plasa <dplasa@gmail.com>2020-05-29 23:29:08 +0200
committerDaniel Plasa <dplasa@gmail.com>2020-05-29 23:29:08 +0200
commit51321af9e4e71f91ad57f8af2dc2e3975a5f1dde (patch)
treeba581c253cbf62f6b98ba3bcf95a3ab272a801e2 /FTPClient.cpp
parentuse esp8266::polledTimeout::oneShotMs fot the timeout handling (diff)
downloadFTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.gz
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.bz2
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.lz
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.xz
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.zst
FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.zip
Diffstat (limited to 'FTPClient.cpp')
-rw-r--r--FTPClient.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/FTPClient.cpp b/FTPClient.cpp
index 84c4fdb..c498ed0 100644
--- a/FTPClient.cpp
+++ b/FTPClient.cpp
@@ -160,15 +160,14 @@ void FTPClient::handleFTP()
millisBeginTrans = millis();
bytesTransfered = 0;
ftpState = cTransfer;
+ allocateBuffer(4 * TCP_MSS);
if (_direction & FTP_PUT_NONBLOCKING)
{
CLIENT_SEND("STOR %s", _remoteFileName.c_str());
- allocateBuffer(file.size());
}
else if (_direction & FTP_GET_NONBLOCKING)
{
CLIENT_SEND("RETR %s", _remoteFileName.c_str());
- allocateBuffer(2048);
}
}
}