k no deadlock

master
bel 2023-03-25 22:57:12 -06:00
parent 802266e500
commit efe4adf129
1 changed files with 7 additions and 2 deletions

View File

@ -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:
}
}
}),