~cadence/cloudtube

57e4507bff56ec5ab725e6d65d82d8a7e2ae5d8a — Cadence Ember 3 months ago 739f537
Don't quit background refresh loop on error
1 files changed, 9 insertions(+), 1 deletions(-)

M background/feed-update.js
M background/feed-update.js => background/feed-update.js +9 -1
@@ 117,7 117,15 @@ class Refresher {
		if (!this.refreshQueue.isEmpty()) {
			this.state = this.sym.ACTIVE
			const ucid = this.refreshQueue.next()
			this.refreshChannel(ucid).then(() => this.next())
			this.refreshChannel(ucid).then(() => this.next()).catch(error => {
				// Problems related to fetching from the instance?
				// All we can do is retry later.
				// However, skip this channel this time in case the problem will occur every time.
				console.error(error)
				setTimeout(() => {
					this.next()
				}, 10e3)
			})
		} else {
			this.state = this.sym.EMPTY
		}