mirror of
https://github.com/robotn/gohook.git
synced 2025-01-18 21:56:40 +08:00
Merge pull request #15 from robotn/fix-pr
Update End() function, Fixed close chan too fast
This commit is contained in:
commit
5802a7a832
3
hook.go
3
hook.go
@ -32,7 +32,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Version get the gohook version
|
// Version get the gohook version
|
||||||
Version = "v0.30.1.83, Sierra Nevada!"
|
Version = "v0.30.2.88, Sierra Nevada!"
|
||||||
|
|
||||||
// HookEnabled honk enable status
|
// HookEnabled honk enable status
|
||||||
HookEnabled = 1 // iota
|
HookEnabled = 1 // iota
|
||||||
@ -244,6 +244,7 @@ func End() {
|
|||||||
asyncon = false
|
asyncon = false
|
||||||
C.endPoll()
|
C.endPoll()
|
||||||
C.stop_event()
|
C.stop_event()
|
||||||
|
time.Sleep(time.Millisecond * 10)
|
||||||
|
|
||||||
for len(ev) != 0 {
|
for len(ev) != 0 {
|
||||||
<-ev
|
<-ev
|
||||||
|
Loading…
Reference in New Issue
Block a user