From 340834baecb0521bde93623fb2449720ce79b1f6 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 13 Feb 2018 12:48:11 +0100 Subject: Close bitmask when the systray quits --- bitmask/main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitmask') diff --git a/bitmask/main.go b/bitmask/main.go index a6452ca..b101367 100644 --- a/bitmask/main.go +++ b/bitmask/main.go @@ -3,6 +3,7 @@ package bitmask import ( "encoding/json" "errors" + "log" "github.com/pebbe/zmq4" ) @@ -43,6 +44,10 @@ func (b *Bitmask) GetStatusCh() chan string { // Close the connection to bitmask func (b *Bitmask) Close() { + _, err := b.send("core", "stop") + if err != nil { + log.Printf("Got an error stopping bitmaskd: %v", err) + } b.coresoc.Close() } -- cgit v1.2.3