Skip to content

Commit

Permalink
Adjust parameter naming (#28899)
Browse files Browse the repository at this point in the history
  • Loading branch information
yx9o authored Nov 1, 2023
1 parent bb982fa commit 1e1096c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ private List<ChannelFuture> startInternal(final List<String> addresses, final in
.childOption(ChannelOption.TCP_NODELAY, true)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new CDCServerHandlerInitializer());
List<ChannelFuture> futures = new ArrayList<>();
for (String address : addresses) {
futures.add(bootstrap.bind(address, port).sync());
List<ChannelFuture> result = new ArrayList<>();
for (String each : addresses) {
result.add(bootstrap.bind(each, port).sync());
}
return futures;
return result;
}

private void createEventLoopGroup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private EventLoopGroup getWorkerGroup() {
/**
* Start ShardingSphere-Proxy.
*
* @param port port
* @param port port
* @param addresses addresses
*/
@SneakyThrows(InterruptedException.class)
Expand Down Expand Up @@ -104,11 +104,11 @@ public void start(final String socketPath) {
private List<ChannelFuture> startInternal(final int port, final List<String> addresses) throws InterruptedException {
ServerBootstrap bootstrap = new ServerBootstrap();
initServerBootstrap(bootstrap);
List<ChannelFuture> futures = new ArrayList<>();
for (String address : addresses) {
futures.add(bootstrap.bind(address, port).sync());
List<ChannelFuture> result = new ArrayList<>();
for (String each : addresses) {
result.add(bootstrap.bind(each, port).sync());
}
return futures;
return result;
}

private ChannelFuture startDomainSocket(final String socketPath) {
Expand All @@ -119,8 +119,8 @@ private ChannelFuture startDomainSocket(final String socketPath) {

private void accept(final List<ChannelFuture> futures) throws InterruptedException {
log.info("ShardingSphere-Proxy {} mode started successfully", ProxyContext.getInstance().getContextManager().getInstanceContext().getModeConfiguration().getType());
for (ChannelFuture future : futures) {
future.channel().closeFuture().sync();
for (ChannelFuture each : futures) {
each.channel().closeFuture().sync();
}
}

Expand Down

0 comments on commit 1e1096c

Please sign in to comment.