aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/ui.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 18c83e2d..db97823d 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -242,8 +242,15 @@ func RunUI() {
}
}
}
- service.IPCClientRegisterTunnelChange(func(tunnel *service.Tunnel, state service.TunnelState) {
- setServiceState(tunnel, state, true)
+ service.IPCClientRegisterTunnelChange(func(tunnel *service.Tunnel, state service.TunnelState, err error) {
+ setServiceState(tunnel, state, err == nil)
+ if err != nil {
+ if mw.Visible() {
+ walk.MsgBox(mw, "Tunnel Error", err.Error()+"\n\nPlease consult the Windows Event Log for more information.", walk.MsgBoxIconWarning)
+ } else {
+ tray.ShowError("WireGuard Tunnel Error", err.Error())
+ }
+ }
})
go func() {
tunnels, err := service.IPCClientTunnels()