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
time.sleep(3)
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.
http://www.networkautomation.com/urc/knowledgebase/common-ftp-socket-errors/02899795-9874-19FA-89D9FA88304286FA/[
^]
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
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx
WSAECONNRESET
10054
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>