summaryrefslogtreecommitdiff
path: root/pkg/backend/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/init.go')
-rw-r--r--pkg/backend/init.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/backend/init.go b/pkg/backend/init.go
index bae9b9b..af43bab 100644
--- a/pkg/backend/init.go
+++ b/pkg/backend/init.go
@@ -34,11 +34,19 @@ func initializeContext(opts *InitOpts) {
func checkErrors(errCh chan string) {
for {
err := <-errCh
+ // TODO consider a queue instead
ctx.Errors = err
go trigger(OnStatusChanged)
}
}
+func resetErrors(errname string) {
+ if ctx.Errors == errname {
+ ctx.Errors = ""
+ log.Println("DEBUG: reset error", errname)
+ }
+}
+
func initializeBitmask(errCh chan string, opts *InitOpts) {
if ctx == nil {
log.Println("bug: cannot initialize bitmask, ctx is nil!")