summaryrefslogtreecommitdiff
path: root/pkg/vpn/launcher.go
diff options
context:
space:
mode:
authorkali <kali@leap.se>2020-09-30 16:25:27 +0200
committerRuben Pollan <meskio@sindominio.net>2020-10-13 19:08:44 +0200
commitef892643df8970aec45dbc3f48eabb95a1ccbf22 (patch)
tree1a20c34cca7b94e69468e471790996fa61909805 /pkg/vpn/launcher.go
parent47ac0543b9ed2d4afb8814a19e2f4dc3c30030e1 (diff)
[pkg] osx helper and working qt installer
Diffstat (limited to 'pkg/vpn/launcher.go')
-rw-r--r--pkg/vpn/launcher.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/vpn/launcher.go b/pkg/vpn/launcher.go
index e18fdc6..234a89c 100644
--- a/pkg/vpn/launcher.go
+++ b/pkg/vpn/launcher.go
@@ -1,5 +1,5 @@
// +build !linux
-// Copyright (C) 2018 LEAP
+// Copyright (C) 2018-2020 LEAP
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -51,12 +51,12 @@ func probeHelperPort(port int) int {
break
}
}
+ log.Println("WARN: Cannot find working helper")
return 0
}
func smellsLikeOurHelperSpirit(port int, c *http.Client) bool {
uri := "http://localhost:" + strconv.Itoa(port) + "/version"
- log.Println("probing for helper at", uri)
resp, err := c.Get(uri)
if err != nil {
return false
@@ -68,9 +68,10 @@ func smellsLikeOurHelperSpirit(port int, c *http.Client) bool {
return false
}
if strings.Contains(string(ver), config.ApplicationName) {
+ log.Println("DEBUG: Successfully probed for matching helper at", uri)
return true
} else {
- log.Println("Another helper replied to our version request:", string(ver))
+ log.Println("DEBUG: Another helper seems to be running:", string(ver))
}
}
return false
@@ -157,7 +158,8 @@ func (l *launcher) send(path string, body []byte) error {
resErr, err := ioutil.ReadAll(res.Body)
if len(resErr) > 0 {
- return fmt.Errorf("Helper returned an error: %q", resErr)
+ /* FIXME why do we trigger a fatal with this error? */
+ return fmt.Errorf("FATAL: Helper returned an error: %q", resErr)
}
return err
}