fix: 10 seconds status timeout was wrong
This commit is contained in:
		
							parent
							
								
									61eafe3db0
								
							
						
					
					
						commit
						abcc014edf
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -102,7 +102,7 @@ status_update_entry(int relay_id, int is_on)
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
status_broadcast(struct mg_mgr *mgr)
 | 
					status_broadcast(struct mg_mgr *mgr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if(timer && (timer - time(NULL) < 10))
 | 
					    if(timer && (time(NULL) - timer < 10))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue