Thanks for your quick response!
Directory is not empty, retry helps pretty often, but not always. Sometimes the application performs hundreds of attempts before getting the listing.
I'm trying to narrow down the possible reasons, i.e. is the problem on the server side or on the client side? Is it possible that the server or the client runs out of available sockets? Based on the server response "227 Entering Passive Mode (10,10,12,215,14,40)" it was able allocated the socket and is waiting to accept an incoming connection. The client opened his socket as well, but did not get any data from the server. Why? And why did we get "226 Transfer complete" after the exception? Could you advise what else should be done to solve the issue or at least to understand what is going on?
Thanks,
Gena