TNMFTP - Socket operation on Non-socket

I have an application that instantiates a class which is a TThread.
Within the class TNMFTP is instantiated, the idea is the  thread
downloads a file and then terminates itself when its done.

In the "onSuccess" event for the FTP control I issue the
In the "onDisconnect" event for the FTP contorl I call the thread's
Terminate() which causes the Execute method to terminate after deleting
the FTPControl et al.

Intermittently I get an "onError" event from the FTPControl -
"10038:Socket operation on non-socket".  The file has been correctly
downloaded and there don't appear to be any other problems.  If I don't
issue the disconnect I don't have the problem.

Can anyone tell me where I'm going wrong here ?