Elffuss BraidHub

kikocis/java-driver public

Merge pull request #328 from tolbertam/authInvalidExceptionFix

Prevent wrapping of Driver and InterruptedException in initAsync.
Changesetad54027f9a3c7fbb59f52d73c99bb1001efd00a83dbaefb6d9f6ab8cbd49126f
AuthorOlivier Michallat <olim7t@users.noreply.github.com> · 2015-04-20 11:01 +02:00
CommitterOlivier Michallat <olim7t@users.noreply.github.com> · 2015-04-20 11:01 +02:00
Parentseb9d2ac7c8ee, dbd070d8ca00

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +3 −3
@@ -182,12 +182,12 @@
182182 future.setException(t);
183183 } else {
184184 // Defunct to ensure that the error will be signaled (marking the host down)
185- ConnectionException ce = (t instanceof ConnectionException)
186- ? (ConnectionException)t
185+ Exception e = (t instanceof ConnectionException || t instanceof DriverException || t instanceof InterruptedException)
186+ ? (Exception)t
187187 : new ConnectionException(Connection.this.address,
188188 String.format("Unexpected error during transport initialization (%s)", t),
189189 t);
190- future.setException(defunct(ce));
190+ future.setException(defunct(e));
191191 }
192192 return future;
193193 }