From efe4adf1290c7481a5035ad489d544784fbc3bcf Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 25 Mar 2023 22:57:12 -0600 Subject: [PATCH] k no deadlock --- src/device/input/parse/v01.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/device/input/parse/v01.go b/src/device/input/parse/v01.go index 761b748..b9641cb 100644 --- a/src/device/input/parse/v01.go +++ b/src/device/input/parse/v01.go @@ -8,8 +8,10 @@ import ( "log" "mayhem-party/src/device/input/button" "mayhem-party/src/device/input/raw" + "mayhem-party/src/device/input/wrap" "net/http" "os" + "syscall" "time" "gopkg.in/yaml.v2" @@ -82,8 +84,11 @@ func (v01 *V01) listen() { v := v01.cfg.Users["broadcast"] v.Message = string(b) v01.cfg.Users["broadcast"] = v - if _, ok := r.URL.Query()["refresh"]; ok { - //wrap.Signal <- syscall.SIGUSR1 + } + if _, ok := r.URL.Query()["refresh"]; ok { + select { + case wrap.ChSigUsr1 <- syscall.SIGUSR1: + default: } } }),