After being depressed for N days, an error 10054 occurs in idftp and the file cannot be uploaded again. An error occurs after the idftp is re-created: 550 cannot create file. Solution: Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiNetwork/html/delphi_20061201111110220.html
As the question.
The server locks the file before it passes the file.
Wait several minutes until the server times out!
Therefore, make sure that the transmission is not broken as suddenly as possible.
Why restartProgramAnd then it can be transmitted normally?
I tested it (the server is Serv-U, Win2k)
Restart Serv-U. If you do not restart the program, the data cannot be transmitted. However, restart my program. If you do not restart Serv-U, the data can be transmitted. Why?
fixed.
Update Indy to indy9.
the internalget function in the idftp unit imports the following statements and processes internalput.
// todo: change that to properly handle response code (not just success or handle T)
// 226 = download successful, 225 = abort successful}
// lresponse: = getresponse ([225,226,250,426,450]);
// If (lresponse = 426) or (lresponse = 450) then begin
// getresponse ([226,225]);
// dostatus (ftpaborted, [rsftpstatusaborttransfer]);
// end;
but restart my program. You can transmit the data without restarting Serv-U. Why?
because your local file is opened in exclusive mode.