Resend login details without disconnect?

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
Posts: 16
Joined: Fri Jun 17, 2005 9:02 pm

Resend login details without disconnect?

Post by Craig » Mon Feb 27, 2006 8: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?


Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)

Re: Resend login details without disconnect?

Post by mb » Mon Feb 27, 2006 9: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.

Last edited by mb on Mon Feb 27, 2006 9:48 pm, edited 1 time in total.

Post Reply