reply handling

master
Alex 2021-12-29 19:59:35 +01:00
parent c2ca8781a0
commit 1634ce4fc5
2 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ type WebClient struct {
voiceConnMu sync.Mutex
VoiceCmdIDs []int
voiceCmdIDMu sync.Mutex
VoiceCMDIDsByBackend []*A // key: cmdID, value: minecraftServerDest
VoiceCMDIDsByBackend []*A
voiceCMDIDsByBackendMu sync.Mutex
}

View File

@ -36,6 +36,7 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
if isVoice {
for vCmdID := range webClient.VoiceCMDIDsByBackend {
logger.Web.Debugln("vCmdID range", vCmdID, cmdID)
if vCmdID == cmdID {
// forward to target dest
targetMcServer := webClient.VoiceCMDIDsByBackend[cmdID]