| | |
| | | |
| | | var configure = string.IsNullOrEmpty(mySession.RegisterCode) ? ConfigureList.Find(x => x.ConfigureParas.RegisterCode == message_str) |
| | | : ConfigureList.Find(x => x.ConfigureParas.RegisterCode == mySession.RegisterCode); |
| | | /* if (configure==null) |
| | | if (configure == null) |
| | | { |
| | | configure = string.IsNullOrEmpty(mySession.Heartbeat) ? ConfigureList.Find(x => x.ConfigureParas.Heartbeat == message_str) |
| | | : ConfigureList.Find(x => x.ConfigureParas.Heartbeat == mySession.Heartbeat); |
| | | }*/ |
| | | configure = string.IsNullOrEmpty(mySession.Heartbeat) ? ConfigureList.Find(x => x.ConfigureParas.Heartbeat == message_str) |
| | | : ConfigureList.Find(x => x.ConfigureParas.Heartbeat == mySession.Heartbeat); |
| | | if (configure != null) |
| | | { |
| | | mySession.Close($"关闭:[{configure.Name}]连接,未检测到注册码!"); |
| | | return; |
| | | } |
| | | } |
| | | if (configure == null) |
| | | { |
| | | LogHelper.Info($"Socket数据对接任务中,端口:{mySession.Server.Options.Listeners.First().Port},收到一条无法识别的消息:{message_str}"); |