summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/backend/status.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/backend/status.go b/pkg/backend/status.go
index f793e2f..16db227 100644
--- a/pkg/backend/status.go
+++ b/pkg/backend/status.go
@@ -5,7 +5,6 @@ import (
"encoding/json"
"log"
"sync"
- "fmt" // DEBUG
"0xacab.org/leap/bitmask-vpn/pkg/bitmask"
"0xacab.org/leap/bitmask-vpn/pkg/config"
@@ -19,13 +18,14 @@ const (
failedStr = "failed"
)
-var statusMutex sync.Mutex
-var updateMutex sync.Mutex
-
// ctx will be our glorious global object.
// if we ever switch again to a provider-agnostic app, we should keep a map here.
var ctx *connectionCtx
+// these mutexes protect setting and updating the global status in this go backend
+var statusMutex sync.Mutex
+var updateMutex sync.Mutex
+
// The connectionCtx keeps the global state that is passed around to C-land. It
// also serves as the primary way of passing requests from the frontend to the
// Go-core, by letting the UI write some of these variables and processing
@@ -57,7 +57,6 @@ func (c connectionCtx) toJson() ([]byte, error) {
log.Println(err)
return nil, err
}
- fmt.Println(">>> ctx toJson done")
return b, nil
}