In FTP client How to handle "Connection reset by peer" error
===

I have a java program which calculates some stats daily and then uploads the file on a server through FTP. But "Connection reset by peer" error occurs way too often.

Adding that I cannot change the server configurations, what are other best ways to handle this error and make sure that file is transferred to the server.