While the SessionNegotiator is present on the pipeline it should react
to exceptions happening on the channel by failing negotiation.
Change-Id: I6571dc25f17c7afe8fa4e4eb58f70ad0bb3397a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
try {
handleMessage((M)msg);
} catch (Exception e) {
try {
handleMessage((M)msg);
} catch (Exception e) {
- logger.debug("Unexpected exception during negotiation", e);
+ logger.debug("Unexpected error while handling negotiation message {}", msg, e);
negotiationFailed(e);
}
}
negotiationFailed(e);
}
}
+
+ @Override
+ public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) {
+ logger.info("Unexpected error during negotiation", cause);
+ negotiationFailed(cause);
+ }