mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

vharseko
16.43.2024 dd1841195f67fc79787673d6c1dbd9ae84306315
[#317] sendUnsolicitedNotification can fail on client disconnect with (#320)

OnErrorNotImplementedException
1 files modified
12 ■■■■ changed files
opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/LDAPServerFilter.java 12 ●●●● patch | view | raw | blame | history
opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/LDAPServerFilter.java
@@ -84,6 +84,7 @@
import com.forgerock.reactive.ReactiveHandler;
import com.forgerock.reactive.Stream;
import io.reactivex.exceptions.OnErrorNotImplementedException;
import io.reactivex.internal.util.BackpressureHelper;
/**
@@ -635,7 +636,7 @@
            return newCompletable(new Completable.Emitter() {
                @Override
                public void subscribe(final Completable.Subscriber s) throws Exception {
                    promise.thenOnResult(new ResultHandler<Boolean>() {
                    promise.thenOnResult(new ResultHandler<Boolean>() {
                        @Override
                        public void handleResult(Boolean result) {
                            s.onComplete();
@@ -643,7 +644,13 @@
                    }).thenOnException(new ExceptionHandler<Exception>() {
                        @Override
                        public void handleException(Exception exception) {
                            s.onError(exception);
                            try {
                                 s.onError(exception);
                            } catch (Throwable t) {
                                if (!(t instanceof OnErrorNotImplementedException)) {
                                    throw t;
                                }
                            }
                        }
                    }).thenOnRuntimeException(new RuntimeExceptionHandler() {
                        @Override
@@ -653,6 +660,7 @@
                    });
                }
            });
        }
    }
}