File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -80,20 +80,20 @@ public void destroy() {
8080
8181 private void startQosServer (URL url ) {
8282 try {
83- boolean qosEnable = url .getParameter (QOS_ENABLE ,true );
83+ if (!hasStarted .compareAndSet (false , true )) {
84+ return ;
85+ }
86+
87+ boolean qosEnable = url .getParameter (QOS_ENABLE , true );
8488 if (!qosEnable ) {
8589 logger .info ("qos won't be started because it is disabled. " +
8690 "Please check dubbo.application.qos.enable is configured either in system property, " +
8791 "dubbo.properties or XML/spring-boot configuration." );
8892 return ;
8993 }
9094
91- if (!hasStarted .compareAndSet (false , true )) {
92- return ;
93- }
94-
9595 int port = url .getParameter (QOS_PORT , QosConstants .DEFAULT_PORT );
96- boolean acceptForeignIp = Boolean .parseBoolean (url .getParameter (ACCEPT_FOREIGN_IP ,"false" ));
96+ boolean acceptForeignIp = Boolean .parseBoolean (url .getParameter (ACCEPT_FOREIGN_IP , "false" ));
9797 Server server = Server .getInstance ();
9898 server .setPort (port );
9999 server .setAcceptForeignIp (acceptForeignIp );
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public void start() throws Throwable {
8282 if (!started .compareAndSet (false , true )) {
8383 return ;
8484 }
85- boss = new NioEventLoopGroup (0 , new DefaultThreadFactory ("qos-boss" , true ));
85+ boss = new NioEventLoopGroup (1 , new DefaultThreadFactory ("qos-boss" , true ));
8686 worker = new NioEventLoopGroup (0 , new DefaultThreadFactory ("qos-worker" , true ));
8787 ServerBootstrap serverBootstrap = new ServerBootstrap ();
8888 serverBootstrap .group (boss , worker );
You can’t perform that action at this time.
0 commit comments