Fix logic bug when checking readings for client
yikes! first probe whose readings were checked okay, was causing other probes to just be skipped
This commit is contained in:
		
							parent
							
								
									3aa4185de9
								
							
						
					
					
						commit
						5830c7bd15
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -124,7 +124,8 @@ class TempmonServerDaemon(Daemon):
 | 
			
		|||
        cutoff = self.now - datetime.timedelta(seconds=delay + 60)
 | 
			
		||||
        online = False
 | 
			
		||||
        for probe in client.enabled_probes():
 | 
			
		||||
            online = online or bool(self.check_readings_for_probe(session, probe, cutoff))
 | 
			
		||||
            if self.check_readings_for_probe(session, probe, cutoff) and not online:
 | 
			
		||||
                online = True
 | 
			
		||||
 | 
			
		||||
        # if client was previously marked online, but we have no "new"
 | 
			
		||||
        # readings, then let's look closer to see if it's been long enough to
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue