mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-11-04 01:51:04 +01:00 
			
		
		
		
	fix node expire error due to type in gorm model Update (#1692)
Fixes #1674 Signed-off-by: fortitude.zhang <fortitude.zhang@gmail.com>
This commit is contained in:
		
							parent
							
								
									1e22f17f36
								
							
						
					
					
						commit
						a369d57a17
					
				@ -900,7 +900,7 @@ func (hsdb *HSDatabase) ExpireExpiredNodes(lastCheck time.Time) time.Time {
 | 
				
			|||||||
			// Do not use setNodeExpiry as that has a notifier hook, which
 | 
								// Do not use setNodeExpiry as that has a notifier hook, which
 | 
				
			||||||
			// can cause a deadlock, we are updating all changed nodes later
 | 
								// can cause a deadlock, we are updating all changed nodes later
 | 
				
			||||||
			// and there is no point in notifiying twice.
 | 
								// and there is no point in notifiying twice.
 | 
				
			||||||
			if err := hsdb.db.Model(nodes[index]).Updates(types.Node{
 | 
								if err := hsdb.db.Model(&nodes[index]).Updates(types.Node{
 | 
				
			||||||
				Expiry: &started,
 | 
									Expiry: &started,
 | 
				
			||||||
			}).Error; err != nil {
 | 
								}).Error; err != nil {
 | 
				
			||||||
				log.Error().
 | 
									log.Error().
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user