FtpGetFile WinINEt never returns
I'm experiencing a curious problem (very strange, let me say hehe). During
a FTP download of an EXE file (24 MB), if the connection is ever
interrupted, it appears that the function FtpGetFile of the WinINEt
library has a bug and it never returns. This causes that future file
transfers fail (the connection is already opened). Apparently, I found a
workaround by increasing the timeout of the server transfers but I do not
like it. I didn't found a similar problem by googling (maybe I introduced
the wrong keywords).
I read some forums on the internet and it seems that everyone does not
recommend using the FtpGetFile because it is buggy.
This appears in a network scenario that has a big lag (and not always) but
in good conditions it disappears (downloads take place correctly and
FtpGetFile returns always).
Here is how I use the function:
if( FtpGetFile(m_hFtpSession, strSourcePath.c_str(),
strTargetPath.c_str(), 0, 0, FTP_TRANSFER_TYPE_BINARY, 0)==TRUE)
Can anyone confirm that? Should I refactor my code and look for an update?
Thank you
No comments:
Post a Comment