reply handling
parent
91f160496b
commit
570ce95091
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue