-
-
Notifications
You must be signed in to change notification settings - Fork 656
Automatic Reconnection
-
Config.SslSessionLength - Number of FTP responses after which we automatically reconnect to the FTP server. Only honored for SSL connections, and ignored for plaintext FTP connections. Required to fix an
IOException
edge case on FTPS connections. Set it to 0 to disable automatic reconnection. Default: 750.
At various intervals, we need to reconnect to the FTP server automatically.
- The FTP server has disconnected us in-between a file transfer, so we need to reconnect and resume the file transfer.
- We predict that the FTPS connection will get corrupted due to OS bugs, so to prevent this, we preemptively disconnect and reconnect on our own.
This happens during upload and download, and is handled within UploadFileInternal
(sync/async) and DownloadFileInternal
(sync/async).
These functions detect if the FTP connection was lost and automatically try to reconnect and resume the transfer.
It is always enabled and does not require configuration as such.
This is only needed and enabled for FTPS/SSL connections and not for plaintext FTP.
We noticed that the underlying SSL stream gets "corrupted" (goes into a unrecoverable state) after around 900 FTP responses are received from the server. So we developed this system to bypass this limitation: we count the FTP responses received, and then pre-emptively disconnect and reconnect to the FTP server.
It is always enabled and does not require configuration as such. But you can modify its behavior using the setting Config.SslSessionLength
(docs above).
- Auto Connection
- Auto Reconnection
- FTP(S) Connection
- FTP(S) Connection using GnuTLS
- FTPS Proxies
- Custom Servers
- Custom Commands
- v40 Migration Guide