From 815292f878f9d9eaa98dd92e09605cc783312787 Mon Sep 17 00:00:00 2001 From: Ethan Li Date: Thu, 21 Sep 2017 16:53:17 -0500 Subject: [PATCH] [STORM-2753] Avoid shutting down netty server on netty exception --- .../messaging/netty/NettyUncaughtExceptionHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/storm-client/src/jvm/org/apache/storm/messaging/netty/NettyUncaughtExceptionHandler.java b/storm-client/src/jvm/org/apache/storm/messaging/netty/NettyUncaughtExceptionHandler.java index 87fae1e837..0f267c4b1b 100644 --- a/storm-client/src/jvm/org/apache/storm/messaging/netty/NettyUncaughtExceptionHandler.java +++ b/storm-client/src/jvm/org/apache/storm/messaging/netty/NettyUncaughtExceptionHandler.java @@ -33,10 +33,9 @@ public void uncaughtException(Thread t, Throwable e) { try { Utils.handleUncaughtException(e); - } catch (Throwable throwable) { - LOG.error("Exception thrown while handling uncaught exception " + throwable.getCause()); + } catch (Error error) { + LOG.error("Exception thrown while handling uncaught exception " + error.getCause()); + Runtime.getRuntime().exit(1); } - LOG.info("Received error in netty thread.. terminating server..."); - Runtime.getRuntime().exit(1); } }