Catch+fire Exceptions thrown from SniHandler's select() method
Motivation Give the user the ability to back out from SNI negoations. Modifications Put a try-catch around the select() call and re-fire any caught Exceptions. Result Fixes #5787
This commit is contained in:
parent
8d6f0a3ce4
commit
9a18159bfe
@ -244,8 +244,12 @@ public class SniHandler extends ByteToMessageDecoder implements ChannelOutboundH
|
||||
final String hostname = in.toString(offset, serverNameLength,
|
||||
CharsetUtil.UTF_8);
|
||||
|
||||
try {
|
||||
select(ctx, IDN.toASCII(hostname,
|
||||
IDN.ALLOW_UNASSIGNED).toLowerCase(Locale.US));
|
||||
} catch (Throwable t) {
|
||||
ctx.fireExceptionCaught(t);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
// invalid enum value
|
||||
|
Loading…
Reference in New Issue
Block a user