* Better exception handling on bind failure in ServerBootstrap
* Fixed a problem where UnfailingChannelFuture doesn't tell what exception cause the IllegalStateException
This commit is contained in:
parent
ae22b0aaa1
commit
0c27f015bf
@ -333,6 +333,10 @@ public class ServerBootstrap extends Bootstrap {
|
||||
public void exceptionCaught(
|
||||
ChannelHandlerContext ctx, ExceptionEvent e)
|
||||
throws Exception {
|
||||
System.err.println(e);
|
||||
e.getCause().printStackTrace();
|
||||
boolean finished = futureQueue.offer(failedFuture(e.getChannel(), e.getCause()));
|
||||
assert finished;
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,6 @@ public class UnfailingChannelFuture extends DefaultChannelFuture {
|
||||
|
||||
@Override
|
||||
public boolean setFailure(Throwable cause) {
|
||||
throw new IllegalStateException("Can not fail");
|
||||
throw new IllegalStateException("Can not fail", cause);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user