From abcc014edf72e890ae64655aed9e001575d3d5b5 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 18 Aug 2020 14:24:46 +0200 Subject: [PATCH] fix: 10 seconds status timeout was wrong --- src/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status.c b/src/status.c index c3995d1..56ff2e3 100644 --- a/src/status.c +++ b/src/status.c @@ -102,7 +102,7 @@ status_update_entry(int relay_id, int is_on) void status_broadcast(struct mg_mgr *mgr) { - if(timer && (timer - time(NULL) < 10)) + if(timer && (time(NULL) - timer < 10)) { return; }