Skip to content

podcast: fix podcast episode download stuck in 'Waiting' state

crvi requested to merge crvi/rhythmbox:podcast-stuck-waiting-issue into master

This MR fixes all side effects of not closing the podcast download input stream. Podcast download will always be stuck after 2 transactions. This is due to libsoup ( current gvfs http backend ) max-conns-per-host property ( which is 2 by default )

Ref: https://developer.gnome.org/libsoup/stable/SoupSession.html#SoupSession--max-conns-per-host

The fix is to close the podcast download input stream in all cases.

Couple of scenarios which will trigger this issue.

Scenario 1:

  1. Subscribe to new podcast feed.
  2. Download 5 episodes.
  3. Delete feed from feed menu. ( Delete Feed Only )
  4. Subscribe to same podcast feed in Step 1.
  5. Download same 5 episodes in Step 2.
  6. After 2 episode downloads successfully ( loading from local file ), other 3 episodes will be in 'Waiting' state.
  7. If Rhythmbox is restarted, 2 other episode downloads will succeed, but the 5th one will be in 'Waiting' state.

Similar to this screenshot

failure-scenario-1

Scenario 2:

  1. Subscribe to new podcast feed.
  2. Download 1 episode.
  3. Go to the episode download directory and remove directory write permissions ( chmod a-w . )
  4. Download more episodes.
  5. After 2 episode download failures, other episode downloads will be in 'Waiting' state.
  6. If Rhythmbox is restarted, 2 other episode downloads will fail, but the others will be in 'Waiting' state.

Similar to this screenshot

failure-scenario-2

Merge request reports