From 7af4d63ea872609a9d7c2f9d954a211bded1b5bb Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 8 Feb 2021 20:34:42 +0100 Subject: [style] cleanup - remove unused debug - uncomment notification function, leftover from debug - comment about go-land mutexes --- pkg/backend/status.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pkg/backend/status.go') 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 } -- cgit v1.2.3