logrus test
parent
f3c90061d2
commit
5ecfc78b11
|
@ -24,6 +24,7 @@ type MinecraftClient struct {
|
|||
func (mcClient *MinecraftClient) SendBinaryMessage(msg []byte) error {
|
||||
mcClient.connMu.Lock()
|
||||
defer mcClient.connMu.Unlock()
|
||||
logger.Minecraft.Debugln("SendBinaryMessage")
|
||||
return mcClient.Conn.WriteMessage(websocket.BinaryMessage, msg)
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@ func AckHandler() {
|
|||
for _, msg := range mcClient.SendQueueMessages {
|
||||
logger.Minecraft.Println("msg", msg)
|
||||
|
||||
if msg.TrySendCount < 4 {
|
||||
msg.TrySendCount++
|
||||
}
|
||||
|
||||
logger.Minecraft.Println("ackHandler mc", msg.TrySendCount, kraSettingsConfig.Cfg.WebSocket.AckTimeouts[msg.TrySendCount], currentTime.UnixMilli()-msg.Time.UnixMilli())
|
||||
|
||||
if int(currentTime.UnixMilli())-int(msg.Time.UnixMilli()) > kraSettingsConfig.Cfg.WebSocket.AckTimeouts[msg.TrySendCount] {
|
||||
|
@ -58,6 +54,10 @@ func AckHandler() {
|
|||
logger.Minecraft.Println("ackHandler err sending msg", err)
|
||||
}
|
||||
}
|
||||
|
||||
if msg.TrySendCount < 4 {
|
||||
msg.TrySendCount++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue