0

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[0];
  for i := 1 to length(n) do
  s := s + s[i];
  if not (n = s) then begin
    ShowMessage('Update');
  end;
end;
2
Contributors
5
Replies
7
Views
8 Years
Discussion Span
Last Post by LizR
0

I've already set IdFTP to be in passive mode.

0

Well, its timing out for some reason.. either because its returning an error or returning something and your code hasnt allowed for it..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.