log tag change
This commit is contained in:
parent
35716b47ce
commit
17fdf1b7ac
|
@ -46,7 +46,7 @@ func (slf *gateway) run(stateMachine *StateMachine, appName string, port int, on
|
||||||
ip := context.GetHeader("X-Real-IP")
|
ip := context.GetHeader("X-Real-IP")
|
||||||
ws, err := upgrade.Upgrade(context.Writer, context.Request, nil)
|
ws, err := upgrade.Upgrade(context.Writer, context.Request, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Websocket Upgrade error", zap.Error(err))
|
log.Error("Gateway", zap.Error(err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(ip) == 0 {
|
if len(ip) == 0 {
|
||||||
|
@ -57,14 +57,14 @@ func (slf *gateway) run(stateMachine *StateMachine, appName string, port int, on
|
||||||
}
|
}
|
||||||
conn := onCreateConnHandleFunc()
|
conn := onCreateConnHandleFunc()
|
||||||
if err := context.ShouldBind(conn); err != nil {
|
if err := context.ShouldBind(conn); err != nil {
|
||||||
log.Error("ServeWebSocket", zap.Error(err))
|
log.Error("Gateway", zap.Error(err))
|
||||||
context.AbortWithStatus(http.StatusBadRequest)
|
context.AbortWithStatus(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
playerGuid, err := stateMachine.sonyflake.NextID()
|
playerGuid, err := stateMachine.sonyflake.NextID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("GuidGenerateFailed", zap.Error(err))
|
log.Error("Gateway", zap.Error(err))
|
||||||
context.AbortWithStatus(http.StatusBadRequest)
|
context.AbortWithStatus(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue