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.
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.
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
ofxHTTP
ofxMediaType
ofxTaskQueue
and try it again? I just made a bunch of improvements to fix other problems and perhaps one of them may have fixed yours?
@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.