Reduce the likelihood of attempting to start a closed event loop (EventGroup can take a while to go from closing -> closed)
@@ -111,7 +111,7 @@ public final class UberHandler<T extends ClusteredNetworkContext<T>> extends Csp
publisher(publisher);
@NotNull final EventLoop eventLoop = nc.eventLoop();
- if (!eventLoop.isClosed()) {
+ if (!eventLoop.isClosed() && !eventLoop.isClosing()) {
eventLoop.start();
// reflect the uber handler
@@ -230,13 +230,11 @@ public final class UberHandler<T extends ClusteredNetworkContext<T>> extends Csp
"fully " +
"process the following " +
"YAML\n");
- }
- catch (ClosedIllegalStateException e) {
+ } catch (ClosedIllegalStateException e) {
Jvm.warn().on(getClass(), e);
close();
- }
- catch (Throwable e) {
+ } catch (Throwable e) {
Jvm.warn().on(getClass(), e);
}
}
