+ public void disconnect(final ChannelHandlerContext ctx, final ChannelPromise promise) {
+ if (isDisconnected.compareAndSet(false, true)) {
+ safelyDisconnect(ctx, promise);
+ }
+ }
+
+ @SuppressWarnings("checkstyle:IllegalCatch")
+ private synchronized void safelyDisconnect(final ChannelHandlerContext ctx, final ChannelPromise promise) {