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

AaronB

Posts

22

Joined

Sat Feb 05, 2011 11:28 am

Exceptions with AsyncFileTransferClient and SFTP shared keys

by AaronB » Thu Feb 24, 2011 5:10 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Exceptions with AsyncFileTransferClient and SFTP shared

by support2 » Thu Feb 24, 2011 2:23 pm

no avatar
User

AaronB

Posts

22

Joined

Sat Feb 05, 2011 11:28 am

by AaronB » Fri Feb 25, 2011 5:49 am

I have just emailed support. Can you please have someone look at this ASAP? We are getting close to launch and this looks like it may be interfering with the application running and pulling the data in a timely fashion.
no avatar
User

AaronB

Posts

22

Joined

Sat Feb 05, 2011 11:28 am

by AaronB » Fri Feb 25, 2011 11:46 am

Ok, if anyone's interested, here's a PSA to NOT try and re-use the AsyncResult.getClient() and use that for any of the synchronous methods. At least, not without calling endAsync() first. :oops:
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Fri Feb 25, 2011 12:23 pm

For AsyncFileTransferClient the rule is to NOT call a synchronous method from inside an asynchronous method's callback.

The synchronous method call in the callback will be waiting to get a free connection, while your asynchronous call that resulted in the callback has not yet freed the connection (and can't until the synch call has completed). Deadlock if you only have one connection. Even with more than one connection, as soon as you have multiple asynchronous method calls you get the same result.

So only use asynchronous methods inside asynchronous method callbacks.

Who is online

Users browsing this forum: No registered users and 90 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron