reply handling
parent
91f160496b
commit
570ce95091
|
@ -11,15 +11,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
|
func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
|
||||||
var raw []byte
|
|
||||||
var err error
|
|
||||||
|
|
||||||
status, cmdID, dest, playerUuid, cmdNumber, args := kraProtocol.DecodeJavaMessage(msg)
|
status, cmdID, dest, playerUuid, cmdNumber, args := kraProtocol.DecodeJavaMessage(msg)
|
||||||
|
|
||||||
mcClient := GetMinecraftClientByConn(conn)
|
mcClient := GetMinecraftClientByConn(conn)
|
||||||
|
|
||||||
if mcClient == nil {
|
if mcClient == nil {
|
||||||
// TODO: when does this apply? Send error with conn?
|
|
||||||
logger.Minecraft.Warnln("mcClient is nil")
|
logger.Minecraft.Warnln("mcClient is nil")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -31,6 +27,9 @@ func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var raw []byte
|
||||||
|
var err error
|
||||||
|
|
||||||
if status == kraProtocol.StatusGet {
|
if status == kraProtocol.StatusGet {
|
||||||
// cmdID already in queue
|
// cmdID already in queue
|
||||||
if isCmdIDInList(mcClient.CmdIDs, cmdID) {
|
if isCmdIDInList(mcClient.CmdIDs, cmdID) {
|
||||||
|
|
|
@ -23,7 +23,6 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
|
||||||
webClient := getWebClientByConn(conn)
|
webClient := getWebClientByConn(conn)
|
||||||
|
|
||||||
if webClient == nil {
|
if webClient == nil {
|
||||||
// TODO: when does this apply? Send error with conn?
|
|
||||||
logger.Web.Debugln("webClient is nil")
|
logger.Web.Debugln("webClient is nil")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue