From 474af43d8e8111e2af1fee2d8b23225ebd483a5a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 05 八月 2020 12:47:55 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/ServerBootstrap.java |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index af7d7e1..b168c21 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -1,7 +1,8 @@
 package com.zy.core;
 
-import com.alibaba.fastjson.JSON;
 import com.core.common.Cools;
+import com.zy.core.cache.SlaveConnection;
+import com.zy.core.enums.SlaveType;
 import com.zy.core.properties.SlaveProperties;
 import com.zy.core.thread.CrnThread;
 import com.zy.core.thread.DevpThread;
@@ -32,19 +33,17 @@
 
     private void initThread(){
         // 鍒濆鍖栧爢鍨涙満绾跨▼
-        if (!Cools.isEmpty(slaveProperties.getCrn())) {
-            for (Slave crn : slaveProperties.getCrn()) {
-                CrnThread crnThread = new CrnThread(crn);
-                new Thread(crnThread).start();
-            }
+        for (Slave crn : slaveProperties.getCrn()) {
+            CrnThread crnThread = new CrnThread(crn);
+            new Thread(crnThread).start();
+            SlaveConnection.put(SlaveType.Crn, crn.getId(), crnThread);
         }
-//        // 鍒濆鍖栫珯鐐圭嚎绋�
-//        if (!Cools.isEmpty(slaveProperties.getDevp())) {
-//            for (Slave devo : slaveProperties.getDevp()) {
-//                DevpThread devpThread = new DevpThread(crn);
-//                new Thread(devpThread).start();
-//            }
-//        }
+
+        // 鍒濆鍖栫珯鐐圭嚎绋�
+        for (Slave devo : slaveProperties.getDevp()) {
+            DevpThread devpThread = new DevpThread(devo);
+            new Thread(devpThread).start();
+        }
 
     }
 

--
Gitblit v1.9.1