aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/manage_tunnels.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-04-10 14:39:28 +0200
committerAlexander Neumann <alexander.neumann@picos-software.com>2019-04-23 11:04:59 +0200
commitc12fc2e95996338baf5e5b41367a57652c1a4be8 (patch)
treef6fd3b1633031eb4f3945f6457103102c06ff4ba /ui/manage_tunnels.go
parentui: implement [de]activation of tunnels via tray (diff)
downloadwireguard-windows-c12fc2e95996338baf5e5b41367a57652c1a4be8.tar.xz
wireguard-windows-c12fc2e95996338baf5e5b41367a57652c1a4be8.zip
ui: use Synchronize method for cross-goroutine calls to walk
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/manage_tunnels.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/manage_tunnels.go b/ui/manage_tunnels.go
index 815dee00..9e3711b6 100644
--- a/ui/manage_tunnels.go
+++ b/ui/manage_tunnels.go
@@ -132,7 +132,9 @@ func (mtw *ManageTunnelsWindow) setup() error {
// TODO: teardown in Dispose()
t := time.NewTicker(time.Second)
for range t.C {
- mtw.updateConfView()
+ mtw.Synchronize(func() {
+ mtw.updateConfView()
+ })
}
}()