diff options
author | Robin Gareus <robin@gareus.org> | 2013-03-26 14:11:52 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-03-26 14:11:52 +0100 |
commit | 0781b871d4164ea020955e521baa04f19be00797 (patch) | |
tree | 1126cf410e3a1b6972b40b61cff5e0a8dccfba07 /gtk2_ardour/video_image_frame.cc | |
parent | 8d2a6b76871534aefd0b98542f78462519caf7ac (diff) |
vtl: increase retry timeout on 503, print http status on error.
Diffstat (limited to 'gtk2_ardour/video_image_frame.cc')
-rw-r--r-- | gtk2_ardour/video_image_frame.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/video_image_frame.cc b/gtk2_ardour/video_image_frame.cc index 30fe487f51..9ba9b09ad0 100644 --- a/gtk2_ardour/video_image_frame.cc +++ b/gtk2_ardour/video_image_frame.cc @@ -195,13 +195,17 @@ http_get_thread (void *arg) { vif->get_video_filename().c_str() ); int status = 0; - int timeout = 400; // * 5ms -> 2sec + int timeout = 1000; // * 5ms -> 5sec char *res = NULL; do { res=curl_http_get(url, &status); if (status == 503) usleep(5000); // try-again } while (status == 503 && --timeout > 0); + if (status != 200 || !res) { + print("no-video frame: video-server returned http-status: %d\n", status); + } + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); vif->http_download_done(res); pthread_exit(0); |