I’m using @bakercp’s ofxHTTP to download video files from a remote server (based on the example_basic_client_loader example that comes with the addon).
On completion, the client saves the file to disk. This works like a charm. However, if the download is interrupted by a lost network connection, ofxHTTP does not indicate that the download has failed. It does not call onTaskFailed() – instead is handles everything as if the file has completed and saves an incomplete file on this drive.
Note that this does not happen when downloading image files. When downloading images, onTaskFailed() is called.
If anybody has any insight into what’s going on, that’d be incredibly helpful.
Hey thanks for the report. Can you provide a few download URL examples and also your operating system, etc. I’ll look into it …
Hi @bakercp, thanks for the zippy response.
I can confirm this behavior with https://ia601600.us.archive.org/22/items/Verbindingsstreepje/Sequence1.mov (from the Internet Archive).
I’m on OSX 10.8, running OF 0.8.
After download begins, I simply turn wifi off. Sometimes it throws an error, sometimes it thinks the download has completed. After trying this a few times, I revoke my previous statement about it not happening with images. I don’t believe the file type has anything do to with it.
If there’s anything I can do on my end to test this out. Please point me in the right direction. It’s unclear to me where in the library ofxHTTP decides that a file is done and to save it to disk.
All the best,
Does it happen with the big-buck-bunny image in the client example? Those are pretty large image files.
Yes, I just downloaded 10 copies of the file, turned off wifi, it took about 1 minute before saving the files and calling onTaskFinished().
Hey @mantissa, sorry I haven’t found a solution yet – it looks like Poco isn’t throwing an exception when the socket closes down, but I’m not sure why yet. I’m going to try it out with the latest Poco build branch later today.
While I do that, can you pull the latest
and try it again? I just made a bunch of improvements to fix other problems and perhaps one of them may have fixed yours?
hey @bakercp, certainly. will give it a whirl and will report back to you. thanks!
@bakercp sorry for the delay, it’s been a hectic week. I was still able to reproduce the issue (with big_big_buck_bunny.jpg) using the most recent libs. It must be the case that Poco isn’t throwing an exception.
Let me know if there’s anything else I can do to help out.