Clean up linter errors

This commit is contained in:
Daniel
2019-11-07 16:13:22 +01:00
parent 35c7f4955b
commit f75fc7d162
50 changed files with 402 additions and 334 deletions

View File

@@ -48,3 +48,7 @@ func initStatusHook() (err error) {
hook, err = database.RegisterHook(query.New(statusDBKey), &statusHook{})
return err
}
func stopStatusHook() error {
return hook.Cancel()
}

View File

@@ -9,10 +9,6 @@ import (
_ "github.com/safing/portmaster/core"
)
var (
shutdownSignal = make(chan struct{})
)
func init() {
modules.Register("status", nil, start, stop, "core")
}
@@ -57,11 +53,5 @@ func start() error {
}
func stop() error {
select {
case <-shutdownSignal:
// already closed
default:
close(shutdownSignal)
}
return nil
return stopStatusHook()
}