In the Indy issue tracker, a bug was reported which first appeared with Delphi 11.

FTP LIST timeout with latest Delphi 11 (and idFTP)

It is possible to reproduce the bug not only with Delphi 11 but also with Free Pascal. Reportedly the timeout also occurs with Delphi 10.4.

If you want to reproduce it with your version of Delphi (or Free Pascal), you may take a small test project from https://github.com/IndySockets/Indy/issues/377#issuecomment-932632490 and configure it to connect with a local or public FTP server.

Test with Delphi 2009 and Free Pascal 3.2.0 (Lazarus 2.0.12) on Windows 10

With Delphi 2009 and Free Pascal 3.2.0, I reproduced a read timeout in line 2134:

if LReadList.ContainsSocket(LDataSocket) then
begin
  LPortSv.Listen(0);
  Self.GetResponse([125, 150, 154]);  <--------------- read timeout
end else
begin
  Self.GetResponse([125, 150, 154]);
end;

STAT> Connected.
RECV> 220 Microsoft FTP Service
SENT> HOST test.rebex.net
RECV> 504 Server cannot accept argument.
SENT> USER demo
RECV> 331 Password required for demo.
SENT> PASS password
RECV> 230 User logged in.
SENT> FEAT
RECV> 211-Extended features supported:
RECV> LANG EN* UTF8 AUTH TLS;TLS-C;SSL;TLS-P; PBSZ PROT C;P; CCC HOST SIZE MDTM REST STREAM211 END
SENT> OPTS UTF8 ON
RECV> 200 OPTS UTF8 command successful – UTF8 encoding now ON.
SENT> TYPE A
RECV> 200 Type set to A.
SENT> SYST
RECV> 215 Windows_NT
SENT> TYPE A
RECV> 200 Type set to A.
SENT> PORT 192,168,178,20,204,119
RECV> 200 PORT command successful.
SENT> LIST
STAT> Disconnected.
Exception at 000000010001DCD9: EIdReadTimeout:
Read timed out.

Tested with servers

  • test.rebex.net
  • ftp.dlptest.com

Call for testers

It would be interesting to confirm if the bug only appears in some specific versions of Delphi and Free Pascal. If you can reproduce it, you may comment here.

Resolved

The issue is resolved now

Advertisement

One thought on “Indy FTP LIST timeout with Delphi 11 in active mode (solved)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s