A similar question was asked a few weeks ago. This was my suggestion . . .
1. Set the FTP timeout to, say, 200msec.
2. Try to send a dummy test file, just a few bytes.
3. If the FTP link times out you can tell that you do not have a connection.
4. If the dummy file transfer succeeds reset the timeout to something sensible, say 5000.
Here is a link.
I am not sure what you mean by "too long".