多网络服务器启动器

This commit is contained in:
kercylan98
2023-04-22 14:23:07 +08:00
parent 26674fefa5
commit eee1caacbf
8 changed files with 168 additions and 45 deletions

View File

@@ -64,7 +64,12 @@ func (slf *event) OnConnectionReceivePacketEvent(conn *Conn, packet []byte) {
}
func (slf *event) check() {
if slf.network != NetworkHttp && len(slf.connectionReceivePacketEventHandles) == 0 {
log.Warn("Server", zap.String("ConnectionReceivePacketEvent", "Invalid server, no packets processed"))
switch slf.network {
case NetworkHttp, NetworkGRPC:
default:
if len(slf.connectionReceivePacketEventHandles) == 0 {
log.Warn("Server", zap.String("ConnectionReceivePacketEvent", "Invalid server, no packets processed"))
}
}
}