reply handling

master
Alex 2021-12-29 15:57:37 +01:00
parent 91f160496b
commit 570ce95091
2 changed files with 3 additions and 5 deletions

View File

@ -11,15 +11,11 @@ import (
)
func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
var raw []byte
var err error
status, cmdID, dest, playerUuid, cmdNumber, args := kraProtocol.DecodeJavaMessage(msg)
mcClient := GetMinecraftClientByConn(conn)
if mcClient == nil {
// TODO: when does this apply? Send error with conn?
logger.Minecraft.Warnln("mcClient is nil")
return
}
@ -31,6 +27,9 @@ func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
return
}
var raw []byte
var err error
if status == kraProtocol.StatusGet {
// cmdID already in queue
if isCmdIDInList(mcClient.CmdIDs, cmdID) {

View File

@ -23,7 +23,6 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
webClient := getWebClientByConn(conn)
if webClient == nil {
// TODO: when does this apply? Send error with conn?
logger.Web.Debugln("webClient is nil")
return
}