From 34d7903e48262fce8b102c2c0b272a00b8941144 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sun, 8 Dec 2019 02:22:53 -0500 Subject: tick.exit channels now using struct{} instead of bool --- svc/periodic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/svc/periodic.go b/svc/periodic.go index 9868d94..0a07371 100644 --- a/svc/periodic.go +++ b/svc/periodic.go @@ -37,7 +37,7 @@ import ( type tick struct { isDB bool t *time.Ticker - exit chan bool + exit chan struct{} } // Creates a new instance of a tick @@ -45,7 +45,7 @@ func initTicker(db bool, interval time.Duration) *tick { return &tick{ isDB: db, t: time.NewTicker(interval), - exit: make(chan bool, 1), + exit: make(chan struct{}, 1), } } @@ -55,8 +55,8 @@ func initTicker(db bool, interval time.Duration) *tick { func killTickers() { ct := <-cTickC dt := <-dbTickC - ct.exit <- true - dt.exit <- true + ct.exit <- struct{}{} + dt.exit <- struct{}{} } // Waits for a signal from the database -- cgit 1.4.1-2-gfad0