Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust parameter naming #28899

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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