From e29fdb45c2d3d10035cc3c8e11046b7beedb44b6 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 31 May 2020 10:11:43 -0400 Subject: [PATCH] Update End() function, Fixed close chan too fast --- hook.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hook.go b/hook.go index 174ce5d..9a8d107 100644 --- a/hook.go +++ b/hook.go @@ -32,7 +32,7 @@ import ( const ( // Version get the gohook version - Version = "v0.30.1.83, Sierra Nevada!" + Version = "v0.30.2.88, Sierra Nevada!" // HookEnabled honk enable status HookEnabled = 1 // iota @@ -244,6 +244,7 @@ func End() { asyncon = false C.endPoll() C.stop_event() + time.Sleep(time.Millisecond * 10) for len(ev) != 0 { <-ev