diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-12 00:04:40 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-12 03:07:59 -0600 |
commit | 9b7fd388c52d7814953da71cb6af74dd3f3c3922 (patch) | |
tree | 9e620accca016b1520f9437ceb6c948ea53f46a1 /service/install.go | |
parent | tunneltracker: redo deletion state machine (diff) | |
download | wireguard-windows-9b7fd388c52d7814953da71cb6af74dd3f3c3922.tar.xz wireguard-windows-9b7fd388c52d7814953da71cb6af74dd3f3c3922.zip |
tunneltracker: don't track tunnels that haven't been started
Otherwise we get the hasn't-been-started-yet error, and the tracker
quits. Meanwhile this is reported back to the ui as an error. While
we're at it, don't let multiple trackers be run, in the event that the
at-start tracker races with the installation tracker. And, make sure we
actually get the deletion notification.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | service/install.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/service/install.go b/service/install.go index 87ac002d..7f39b2bc 100644 --- a/service/install.go +++ b/service/install.go @@ -65,7 +65,7 @@ func InstallManager() error { break } service.Close() - time.Sleep(time.Second) + time.Sleep(time.Second / 3) } } @@ -163,8 +163,9 @@ func InstallTunnel(configPath string) error { if err != nil { return err } - go trackTunnelService(name, service) - return service.Start() + err = service.Start() + go trackTunnelService(name, service) // Pass off reference to handle. + return err } func UninstallTunnel(name string) error { |