reply handling
parent
c2ca8781a0
commit
1634ce4fc5
|
@ -30,7 +30,7 @@ type WebClient struct {
|
||||||
voiceConnMu sync.Mutex
|
voiceConnMu sync.Mutex
|
||||||
VoiceCmdIDs []int
|
VoiceCmdIDs []int
|
||||||
voiceCmdIDMu sync.Mutex
|
voiceCmdIDMu sync.Mutex
|
||||||
VoiceCMDIDsByBackend []*A // key: cmdID, value: minecraftServerDest
|
VoiceCMDIDsByBackend []*A
|
||||||
voiceCMDIDsByBackendMu sync.Mutex
|
voiceCMDIDsByBackendMu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
|
||||||
|
|
||||||
if isVoice {
|
if isVoice {
|
||||||
for vCmdID := range webClient.VoiceCMDIDsByBackend {
|
for vCmdID := range webClient.VoiceCMDIDsByBackend {
|
||||||
|
logger.Web.Debugln("vCmdID range", vCmdID, cmdID)
|
||||||
if vCmdID == cmdID {
|
if vCmdID == cmdID {
|
||||||
// forward to target dest
|
// forward to target dest
|
||||||
targetMcServer := webClient.VoiceCMDIDsByBackend[cmdID]
|
targetMcServer := webClient.VoiceCMDIDsByBackend[cmdID]
|
||||||
|
|
Loading…
Reference in New Issue