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.