ningshuxia
2022-10-28 3ccb7c60e1ed8b6748ed7fb8b64b1dbe50d62abf
Server/IStation.DataDocking.Socket/Job/PackageHandleHelper.cs
@@ -33,11 +33,16 @@
                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}");