[rhythmbox] podcast: add delay before retrying on connection errors too
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] podcast: add delay before retrying on connection errors too
- Date: Thu, 3 Sep 2020 22:36:08 +0000 (UTC)
commit 9109537a3ed6ed91b51af4b0abf7660641fd0d83
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Sep 4 08:34:46 2020 +1000
podcast: add delay before retrying on connection errors too
also write error details to the debug log to make it easier to figure out
what should or should not be retried later.
podcast/rb-podcast-manager.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index c6f78bebe..15f203e32 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -1925,6 +1925,7 @@ get_local_download_uri (RBPodcastManager *pd, RBPodcastDownload *download)
static gboolean
retry_on_error (GError *error)
{
+ rb_debug ("retry on error %s/%d (%s)", g_quark_to_string (error->domain), error->code,
error->message);
if (error->domain == G_IO_ERROR) {
switch (error->code) {
case G_IO_ERROR_CLOSED:
@@ -2037,6 +2038,7 @@ download_task (GTask *task, gpointer source_object, gpointer task_data, GCancell
if (error != NULL) {
if (retry_on_error (error)) {
rb_debug ("retrying after error from http request: %s", error->message);
+ g_usleep (DOWNLOAD_RETRY_DELAY * G_USEC_PER_SEC);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]