I'm trying to use IdFTP to connect to a web host. The .List line is giving me a huge problem that I've yet to solve. I keep getting Socket Error 10054. What I'm trying to do is make an auto update feature that alerts the user when a new version is out but when it gets to to List part, it hangs, then it gives me the 10054 socket error. I debugged it and I am 100% absolutely positive it's the .List line. I know what 10054 is, I just don't know what is in my .List that is causing it (I know it is not the web host because the person who gave me this host says he does the same type of FTP codes in Delphi I do and they work for him).
procedure TForm1.BrowseEnter(Sender: TObject); var x:TStrings; i:integer; s:string; n:string; begin x := TStrings.Create; IdFTP1.Host := 'withheld'; IdFTP1.Username := 'withheld'; IdFTP1.Password := 'withheld'; IdFTP1.Connect; IdFTP1.ChangeDir('public_html'); idFTP1.List(x, 'pb*', false); IdFTP1.Disconnect; n := x; for i := 1 to length(n) do s := s + s[i]; if not (n = s) then begin ShowMessage('Update'); end; end;