GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Handle resolver failure before connect completion · netty/netty@306143a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • transport/src/main/java/io/netty/bootstrap
    • Bootstrap.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎transport/src/main/java/io/netty/bootstrap/Bootstrap.java‎

Copy file name to clipboardExpand all lines: transport/src/main/java/io/netty/bootstrap/Bootstrap.java
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,11 @@ private ChannelFuture doResolveAndConnect0(final Channel channel, SocketAddress
240240

241241
// Wait until the name resolution is finished.
242242
resolveFuture.addListener((FutureListener<SocketAddress>) future -> {
243-
if (promise.isDone()) {
244-
return;
245-
}
246-
if (future.cause() != null) {
243+
Throwable cause = future.cause();
244+
if (cause != null) {
247245
channel.close();
248-
promise.tryFailure(future.cause());
249-
} else {
246+
promise.tryFailure(cause);
247+
} else if (!promise.isDone()) {
250248
doConnect(future.getNow(), localAddress, promise);
251249
}
252250
});

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.