From 8e0cab4c09c0c276f9e3ca7200e235eee91037f6 Mon Sep 17 00:00:00 2001 From: Dmitriy Tverdiakov Date: Wed, 20 Nov 2024 23:47:42 +0000 Subject: [PATCH] Notify handler of all errors in RoutedBoltConnection --- .../internal/bolt/routedimpl/RoutedBoltConnection.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/driver/src/main/java/org/neo4j/driver/internal/bolt/routedimpl/RoutedBoltConnection.java b/driver/src/main/java/org/neo4j/driver/internal/bolt/routedimpl/RoutedBoltConnection.java index 1c33772a1..5aaff65f2 100644 --- a/driver/src/main/java/org/neo4j/driver/internal/bolt/routedimpl/RoutedBoltConnection.java +++ b/driver/src/main/java/org/neo4j/driver/internal/bolt/routedimpl/RoutedBoltConnection.java @@ -183,14 +183,9 @@ public CompletionStage clear() { @Override public CompletionStage flush(ResponseHandler handler) { return delegate.flush(new ResponseHandler() { - private Throwable error; - @Override public void onError(Throwable throwable) { - if (error == null) { - error = handledError(throwable); - handler.onError(error); - } + handler.onError(handledError(throwable)); } @Override