From 1634ce4fc5e9434078eecf55d7cf01de763d95b1 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Dec 2021 19:59:35 +0100 Subject: [PATCH] reply handling --- modules/structs/WebClient.go | 2 +- serverCommunication/web.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/structs/WebClient.go b/modules/structs/WebClient.go index b4d2209..4f8d585 100644 --- a/modules/structs/WebClient.go +++ b/modules/structs/WebClient.go @@ -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 } diff --git a/serverCommunication/web.go b/serverCommunication/web.go index e16c430..1245be7 100644 --- a/serverCommunication/web.go +++ b/serverCommunication/web.go @@ -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]