forked from an/flokati
		
	modules/rss.go: dont exit feed poller on error
This commit is contained in:
		
							parent
							
								
									b69323fc00
								
							
						
					
					
						commit
						87f2ca8e16
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -57,10 +57,9 @@ func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
 | 
			
		|||
	for {
 | 
			
		||||
		xlog.Info("Polling feed: %s", uri)
 | 
			
		||||
		if err := feed.Fetch(uri, cr); err != nil {
 | 
			
		||||
			xlog.Info("[e] %s: %s", "*", uri, err)
 | 
			
		||||
			//SayCh <- fmt.Sprintf("%s\n[RSS] Error %s: %s", *rssChannel, uri, err)
 | 
			
		||||
			return
 | 
			
		||||
			xlog.Error("Feed error: %s: %s", "*", uri, err)
 | 
			
		||||
		}
 | 
			
		||||
		xlog.Info("Polled %s, next poll in %d seconds", uri, feed.SecondsTillUpdate())
 | 
			
		||||
		<-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9))
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue