by dlangell » Fri May 23, 2014 12:15 am
This is not what I'm seeing (edtFTPnetPRO 8.5.0.20). Just for kicks, I called Close(True) and then called Close() directly afterwards 4-5 times. No exceptions were raised.
Again, the real issue is if I call Close(True) on a connection attempt to a server that IS NOT available (i.e. unplugged, powered off, disconnected from the network, etc.) In the code example listed previously, after calling Close(True) in this situation, if I were to be a good boy and call myFTP.Dispose as the very next line, the call to Dispose will block until the connection timeout actually expires, even though I just forced the close. I also see this if I immediately try to remove a handler as part of my cleanup. (All of this happens even if I DO NOT make a second call to Close().
If using the synchronous methods instead (by calling Connect on a worker thread and calling Close(True) on the parent thread), a subsequent call to Dispose will not block, but if I then Join the worker thread until it finishes, the join will block until the connection timeout expires, even though I tried to force the close from the parent. Right now I'm just forcing the worker thread to abort if it doesn't finish within a few seconds after trying to close the connection (which I'm not a fan of doing since it's not as clean).
I just renewed my support and upgraded to the latest version last week. Should I open an official support ticket instead of working through the forums?