Reputation: 2951
When I call the function
IdFtp.List(myList, '', false);
afterwards I have logged in and changed the ftp directory, I get a socket-error #10054 exception ("Connection reset by peer.") occesionally.
When I call that function e.g. 20 times consecutively I get that exception 1 time.
That problem I have only encountered on Vista OS.
Does anybody know what the problem is or how I can avoid it?
Upvotes: 4
Views: 7087
Reputation: 1
In the component "IdFTP", change the following properties:
Upvotes: 0
Reputation: 21252
Not much you can do about this, because the disconnection is done by the FTP server. You have a few choices:
NOOP
command periodically (switching to Passive mode can also help).Here is a screen-shot from FileZilla
FTP server time-out settings:
Note that with the above settings, the FTP client will be disconnected after 2 min of non-activity.
setting that value to 0, will disable the time-out.
Upvotes: 3
Reputation: 596582
The FTP protocol uses multiple socket connections. Every time you call List()
, a new socket connection is established to transfer the requested listing data. It sounds like the FTP server is not always closing the socket correctly at the end of a transfer.
Upvotes: 2