Jump to content


Photo

Resend login details without disconnect?


  • Please log in to reply
1 reply to this topic

#1 Craig

Craig
  • Members
  • 16 posts

Posted 27 February 2006 - 08:21 PM

I'm having trouble with the following sequence of steps:

1) Set up the FTP connection as necessary, with an invalid username or password
2) Call Connect()
3) Catch the 500/530 error and update the username and password to correct values
4) Goto 2

As written the second Connect() call returns ftpErrorNotDisconnected. If I add a call to Disconnect() after step 3 then it works correctly, but that doesn't seem like it should be necessary. Is this an intentional limitation?

Thanks,
Craig

#2 mb

mb

    Developer

  • Administrators
  • 11520 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 27 February 2006 - 09:16 PM

Hello ..

Yes this is a limitation. A lot of FTP servers automatically close the connection if the authentication fails anyway. It's safer to restart with the complete connect/login sequence.

Regards,
-Mat
SmartFTP




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users