作者 crossoverJie

:art: 改进代码的结构/格式

... ... @@ -39,7 +39,6 @@ public class HeartBeatServer {
@Value("${netty.server.port}")
private int nettyPort;
private NioServerSocketChannel channel;
/**
* 启动 Netty
... ... @@ -62,7 +61,6 @@ public class HeartBeatServer {
if (future.isSuccess()) {
LOGGER.info("启动 Netty 成功");
}
channel = (NioServerSocketChannel) future.channel();
}
... ...
... ... @@ -30,8 +30,6 @@ public class NettySocketHolder {
}
public static void remove(NioSocketChannel nioSocketChannel) {
MAP.entrySet().stream().filter(entry -> entry.getValue() == nioSocketChannel).forEach(entry -> {
MAP.remove(entry.getKey());
});
MAP.entrySet().stream().filter(entry -> entry.getValue() == nioSocketChannel).forEach(entry -> MAP.remove(entry.getKey()));
}
}
... ...