summaryrefslogtreecommitdiff
path: root/bitmask_go/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-20 16:57:44 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-21 11:42:39 +0200
commit199ef6f9be94a08580cd6bdbf5d54518e11217c1 (patch)
tree15d696d952b60c0a2da41332d108d83866c4edf7 /bitmask_go/main.go
parent2439d744ac42e7c77e4848de50dd432f7d9b12bc (diff)
[feat] add support for the windows launcher
Diffstat (limited to 'bitmask_go/main.go')
-rw-r--r--bitmask_go/main.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitmask_go/main.go b/bitmask_go/main.go
index fee4a42..357d53f 100644
--- a/bitmask_go/main.go
+++ b/bitmask_go/main.go
@@ -40,7 +40,10 @@ func Init() (*Bitmask, error) {
return nil, err
}
bonafide := newBonafide()
- launch := newLauncher()
+ launch, err := newLauncher()
+ if err != nil {
+ return nil, err
+ }
b := Bitmask{tempdir, statusCh, nil, bonafide, launch}
err = b.StopVPN()
@@ -70,7 +73,11 @@ func (b *Bitmask) GetStatusCh() <-chan string {
// Close the connection to bitmask
func (b *Bitmask) Close() {
b.StopVPN()
- err := os.RemoveAll(b.tempdir)
+ err := b.launch.close()
+ if err != nil {
+ log.Printf("There was an error closing the launcher: %v", err)
+ }
+ err = os.RemoveAll(b.tempdir)
if err != nil {
log.Printf("There was an error removing temp dir: %v", err)
}