|
|
@ -119,11 +119,7 @@ public class NettyRemotingServer { |
|
|
|
* server start |
|
|
|
* server start |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void start(){ |
|
|
|
public void start(){ |
|
|
|
|
|
|
|
if (isStarted.compareAndSet(false, true)) { |
|
|
|
if(this.isStarted.get()){ |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.serverBootstrap |
|
|
|
this.serverBootstrap |
|
|
|
.group(this.bossGroup, this.workGroup) |
|
|
|
.group(this.bossGroup, this.workGroup) |
|
|
|
.channel(NioServerSocketChannel.class) |
|
|
|
.channel(NioServerSocketChannel.class) |
|
|
@ -155,8 +151,7 @@ public class NettyRemotingServer { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new RuntimeException(String.format("NettyRemotingServer bind %s fail", serverConfig.getListenPort())); |
|
|
|
throw new RuntimeException(String.format("NettyRemotingServer bind %s fail", serverConfig.getListenPort())); |
|
|
|
} |
|
|
|
} |
|
|
|
//
|
|
|
|
} |
|
|
|
isStarted.compareAndSet(false, true); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|