mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-14 04:17:29 +00:00
Don't quit background refresh loop on error
This commit is contained in:
parent
739f537bc7
commit
57e4507bff
@ -117,7 +117,15 @@ class Refresher {
|
|||||||
if (!this.refreshQueue.isEmpty()) {
|
if (!this.refreshQueue.isEmpty()) {
|
||||||
this.state = this.sym.ACTIVE
|
this.state = this.sym.ACTIVE
|
||||||
const ucid = this.refreshQueue.next()
|
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 {
|
} else {
|
||||||
this.state = this.sym.EMPTY
|
this.state = this.sym.EMPTY
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user