Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.

Dropped Connections

no avatar
User

mstoreysmith

Posts

2

Joined

Thu Nov 24, 2011 6:49 am

Dropped Connections

by mstoreysmith » Thu Nov 24, 2011 6:56 am

Using edtFTP, is it possible to recover from a dropped connection to the server in mid-transfer?

When I yank the internet connection in the midst of an upload, my Java app just seems to hang. It doesn't abort and I don't see an exception that I could catch.

Also, is there at least a timeout I can set? I've tried, setTimeout(), getAdvancedFTPSettings().setRetryCount() and getAdvancedFTPSettings().setRetryDelay() but none of those seem to have any effect.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Dropped Connections

by support2 » Thu Nov 24, 2011 7:20 am

What timeout value are you setting?
no avatar
User

mstoreysmith

Posts

2

Joined

Thu Nov 24, 2011 6:49 am

Re: Dropped Connections

by mstoreysmith » Thu Nov 24, 2011 9:42 am

Right now, I'm doing setTimeout(20000), but I've used a range of values, and the bottom line is it doesn't seem to be timing out when the connection drops. The use I'm putting this to is a circumstance where files are often being sent over an aircard, so a dropped connection is extremely common, and the application needs to detect this and recover.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Dropped Connections

by support2 » Fri Nov 25, 2011 1:16 pm

Normally this isn't a problem - you get an exception thrown.

Are you sure a transfer is occurring? The socket read should time out.

Maybe it is worth writing a simple Java socket program to try to see if you can detect the unplug.

Who is online

Users browsing this forum: No registered users and 123 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign