I have a Delphi XE5 Android app that connects to an Indy FTP server running on a PC (Server is the Indy 10 IdFTPServer demo). I FTP.Get the same file from the server (every 2 seconds) and display the contents (24 chars) in a label on my Android device. It always works for 16 times and then the android app exits. From the servers point of view, it reports "10054, Connection reset by peer"
Here is the code:
procedure TForm3.FetchTimerTimer(Sender: TObject);
var
str : string;
begin
inc(FetchCnt);
aStream.Position := 0;
FTP.Get('Time1.txt', aStream);
aStream.Position := 0;
str := aStream.ReadString(255);
CmdLabel.text := inttostr(FetchCnt) + ') ' + str;
end;
Is 16 a magic number somewhere ? Works as expected until after the 16th FTP.Get Ideas ?