Skip to content

Commit

Permalink
Throw an exception during server bind if it fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevg committed Apr 9, 2014
1 parent c48a87e commit e4cf8ef
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,15 @@ public ServerChannel newChannel() {
@Override
public void operationComplete(ChannelFuture future)
throws Exception {
System.out.println("cause1: " + future.cause() + ", " + future);
if (future.isSuccess()) {
registerChannel(future.channel());
}
}
});
}).awaitUninterruptibly();
Throwable cause = future.cause();
if (cause != null) {
throw new RuntimeException(cause);
} else {
future.awaitUninterruptibly();
}
}

Expand Down

0 comments on commit e4cf8ef

Please sign in to comment.