Following a fix:
The data-socket must effectively be stopped from accepting a
connection once the primary transfer command has failed. If the
data-socket is simply closed then on client-side an error is raised -
so my solution is not to call datasocket.accept on the incoming
connection -
The data-socket must effectively be stopped from accepting a
connection once the primary transfer command has failed.
I found your change made no difference to the issue of the extra
response being generated, since it was triggered when the data socket
was closed, and it was already open
Followup Fix to my first posting:
If you want to reproduce the bug even on a fast connection simply enter in
File FtpCli
procedure TCustomFtpCli.Next1GetAsync;
...
SetErrorMessage;
FNext := nil;
-Sleep(500);
FDataSocket.Close;
DestroyLocalStream;
...