What's actually happening is the server on the otherside of the request is closing the connection.
It's possible that the problem lies on the server side.
I've tried inserting
which kind of seems to help. I'd really rather not be inserting seconds into the run time though.
Final update and solution achieved. Given the possibility of a serverside malfunction or misbehavior I changed my IP address. My code compiles and runs as it did last week.
FTP Socket Error Code 10054
Additionally, if you are encountering any FTP related issues, we strongly suggest that you test the transmission with other FTP clients. This is a good method in determining the root of the problem. Keep in mind that when you are having similar problematic behavior in multiple clients against the same server, it's more than likely a server problem
Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.</pre>