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,
|
final String hostname = in.toString(offset, serverNameLength,
|
||||||
CharsetUtil.UTF_8);
|
CharsetUtil.UTF_8);
|
||||||
|
|
||||||
select(ctx, IDN.toASCII(hostname,
|
try {
|
||||||
IDN.ALLOW_UNASSIGNED).toLowerCase(Locale.US));
|
select(ctx, IDN.toASCII(hostname,
|
||||||
|
IDN.ALLOW_UNASSIGNED).toLowerCase(Locale.US));
|
||||||
|
} catch (Throwable t) {
|
||||||
|
ctx.fireExceptionCaught(t);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// invalid enum value
|
// invalid enum value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user