Skip to content

Commit

Permalink
优化日志
Browse files Browse the repository at this point in the history
  • Loading branch information
kercylan98 committed May 11, 2023
1 parent 434e3ff commit 22cd55f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,15 @@ func (slf *event) check() {
switch slf.network {
case NetworkHttp, NetworkGRPC:
default:
if len(slf.connectionReceivePacketEventHandles) == 0 {
log.Warn("Server", zap.String("ConnectionReceivePacketEvent", "Invalid server, no packets processed"))
switch slf.network {
case NetworkWebsocket:
if len(slf.connectionReceiveWebsocketPacketEventHandles) == 0 {
log.Warn("Server", zap.String("ConnectionReceiveWebsocketPacketEvent", "Invalid server, no packets processed"))
}
default:
if len(slf.connectionReceivePacketEventHandles) == 0 {
log.Warn("Server", zap.String("ConnectionReceivePacketEvent", "Invalid server, no packets processed"))
}
}
}

Expand Down

0 comments on commit 22cd55f

Please sign in to comment.