about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-12-08 02:21:10 -0500
committerBen Morrison <ben@gbmor.dev>2019-12-08 02:21:10 -0500
commit85f600064f5a3386be081653f1050066beee985b (patch)
treeac7a953e92b2d3d43a2cd2b887bfe08074f430ed
parent4d7c4f51a35d893dea2f75933bff32c813512b91 (diff)
downloadgetwtxt-85f600064f5a3386be081653f1050066beee985b.tar.gz
closeLog channel now accepts struct{} instead of bool
-rw-r--r--svc/init.go4
-rw-r--r--svc/periodic.go2
-rw-r--r--svc/svc.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/svc/init.go b/svc/init.go
index 1d8b0c6..b5f4061 100644
--- a/svc/init.go
+++ b/svc/init.go
@@ -46,7 +46,7 @@ var (
 var confObj = &Configuration{}
 
 // Signals to close the log file
-var closeLog = make(chan bool, 1)
+var closeLog = make(chan struct{}, 1)
 
 // Used to transmit database pointer
 var dbChan = make(chan dbase, 1)
@@ -140,7 +140,7 @@ func watchForInterrupt() {
 			confObj.Mu.RLock()
 			log.Printf("Closed database connection to %v\n", confObj.DBPath)
 			if !confObj.StdoutLogging {
-				closeLog <- true
+				closeLog <- struct{}{}
 			}
 			confObj.Mu.RUnlock()
 
diff --git a/svc/periodic.go b/svc/periodic.go
index 2c08e46..9868d94 100644
--- a/svc/periodic.go
+++ b/svc/periodic.go
@@ -92,7 +92,7 @@ func reInit(e fsnotify.Event) {
 	log.Printf("%v. Reloading...\n", e.String())
 
 	if !confObj.StdoutLogging {
-		closeLog <- true
+		closeLog <- struct{}{}
 	}
 
 	killTickers()
diff --git a/svc/svc.go b/svc/svc.go
index 8b5c113..01dd0d7 100644
--- a/svc/svc.go
+++ b/svc/svc.go
@@ -72,7 +72,7 @@ func Start() {
 		errLog("", server.ListenAndServe())
 	}
 
-	closeLog <- true
+	closeLog <- struct{}{}
 	killTickers()
 	killDB()
 	close(dbChan)