fix: 10 seconds status timeout was wrong

This commit is contained in:
Tobias Reisinger 2020-08-18 14:24:46 +02:00
parent 61eafe3db0
commit abcc014edf

View file

@ -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;
} }