Minor fix on backend coordinate ratio conversion.

This commit is contained in:
genxium
2022-11-13 12:52:17 +08:00
parent 4369729d9c
commit b031fc1c61
5 changed files with 11 additions and 6 deletions

View File

@@ -16,6 +16,7 @@ import (
"time"
. "dnmshared"
"runtime/debug"
)
const (
@@ -104,7 +105,7 @@ func Serve(c *gin.Context) {
}
defer func() {
if r := recover(); r != nil {
Logger.Warn("Recovered from: ", zap.Any("panic", r))
Logger.Error("Recovered from: ", zap.Any("panic", r))
}
}()
/**
@@ -356,7 +357,7 @@ func Serve(c *gin.Context) {
receivingLoopAgainstPlayer := func() error {
defer func() {
if r := recover(); r != nil {
Logger.Warn("Goroutine `receivingLoopAgainstPlayer`, recovery spot#1, recovered from: ", zap.Any("panic", r))
Logger.Error("Goroutine `receivingLoopAgainstPlayer`, recovery spot#1, recovered from: ", zap.Any("panic", r), zap.Any("callstack", debug.Stack()))
}
Logger.Info("Goroutine `receivingLoopAgainstPlayer` is stopped for:", zap.Any("playerId", playerId), zap.Any("roomId", pRoom.Id))
}()