mirror of
				https://git.sr.ht/~cadence/cloudtube
				synced 2025-11-03 21:57:14 +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()) {
 | 
			
		||||
			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
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user