diff options
Diffstat (limited to 'bitmask')
-rw-r--r-- | bitmask/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitmask/main.go b/bitmask/main.go index 4efaae1..185c3a0 100644 --- a/bitmask/main.go +++ b/bitmask/main.go @@ -19,6 +19,7 @@ import ( "encoding/json" "errors" "log" + "time" "github.com/pebbe/zmq4" ) @@ -26,6 +27,7 @@ import ( const ( // On win should be: tcp://127.0.0.1:5001 coreEndpoint = "ipc:///tmp/bitmask.core.sock" + timeout = time.Second * 40 ) // Bitmask holds the bitmask client data @@ -47,6 +49,8 @@ func Init() (*Bitmask, error) { return nil, err } + coresoc.SetRcvtimeo(timeout) + b := Bitmask{coresoc, eventsoc, statusCh} go b.eventsHandler() return &b, nil |