File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
job-core/src/main/java/com/lts/job Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public void addNodes(List<Node> nodes) {
5151 }
5252 }
5353 }
54- if (master != newMaster ) {
54+ if (master == null || ! master . equals ( newMaster ) ) {
5555 master = newMaster ;
5656 notifyListener ();
5757 }
Original file line number Diff line number Diff line change 11package com .lts .job .remoting .netty ;
22
3+ import com .lts .job .core .constant .Constants ;
4+
35/**
46 * Netty服务端配置
57 */
68public class NettyServerConfig {
79 private int listenPort = 8888 ;
810 private int serverWorkerThreads = 32 ;
911 private int serverCallbackExecutorThreads = 0 ;
10- private int serverSelectorThreads = 8 ;
12+ private int serverSelectorThreads = Constants . AVAILABLE_PROCESSOR * 2 ;
1113 private int serverOnewaySemaphoreValue = 32 ;
1214 private int serverAsyncSemaphoreValue = 64 ;
1315 private int serverChannelMaxIdleTimeSeconds = 120 ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class RemotingCommand {
3939 private static final Logger LOGGER = LoggerFactory .getLogger (RemotingCommand .class );
4040
4141 private static final int RPC_TYPE = 0 ; // 0, REQUEST_COMMAND
42- private static final int RPC_ONEWAY = 1 ; // 0 , RPC
42+ private static final int RPC_ONEWAY = 1 ; // 1 , RPC
4343 // 1, Oneway
4444 private static AtomicInteger RequestId = new AtomicInteger (0 );
4545 /**
You can’t perform that action at this time.
0 commit comments