diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-12 15:16:01 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-13 13:28:00 +0200 |
commit | bed5bfa487cc91a7697b165b49430190cac1c8b9 (patch) | |
tree | a9afc7ce88c727e8f66662b1611bb6665a8b91a8 /ui/ui.go | |
parent | ui: do not overlay gray dot on icon (diff) | |
download | wireguard-windows-bed5bfa487cc91a7697b165b49430190cac1c8b9.tar.xz wireguard-windows-bed5bfa487cc91a7697b165b49430190cac1c8b9.zip |
ui: lock runtime thread as early as possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | ui/ui.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -9,6 +9,7 @@ import ( "fmt" "github.com/lxn/walk" "golang.zx2c4.com/wireguard/windows/service" + "runtime" "runtime/debug" "time" ) @@ -17,6 +18,7 @@ var shouldQuitManagerWhenExiting = false var startTime = time.Now() func RunUI() { + runtime.LockOSThread() defer func() { if err := recover(); err != nil { walk.MsgBox(nil, "Panic", fmt.Sprint(err, "\n\n", string(debug.Stack())), walk.MsgBoxIconError) |