Update lastupdate only when fetching
This commit is contained in:
		
							parent
							
								
									87b95b233d
								
							
						
					
					
						commit
						4840ef15a3
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								feed.go
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								feed.go
									
										
									
									
									
								
							| 
						 | 
					@ -154,6 +154,7 @@ func (this *Feed) FetchClient(uri string, client *http.Client, charset xmlx.Char
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						this.lastupdate = time.Now().UTC().UnixNano()
 | 
				
			||||||
	this.Url = uri
 | 
						this.Url = uri
 | 
				
			||||||
	doc := xmlx.New()
 | 
						doc := xmlx.New()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -250,7 +251,6 @@ func (this *Feed) CanUpdate() bool {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this.lastupdate = utc.UnixNano()
 | 
					 | 
				
			||||||
	return true
 | 
						return true
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue