diff --git a/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java b/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java index 3fedb48a3..720ac6f02 100644 --- a/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java +++ b/src/main/java/com/arangodb/internal/velocystream/VstCommunication.java @@ -92,6 +92,12 @@ protected synchronized C connect(final HostHandle hostHandle, final AccessType a tryAuthenticate(connection); } hostHandler.confirm(); + if (!connection.isOpen()) { + // see https://github.com/arangodb/arangodb-java-driver/issues/384 + hostHandler.fail(); + host = hostHandler.get(hostHandle, accessType); + continue; + } return connection; } catch (final IOException e) { hostHandler.fail();