Elffuss BraidHub

kikocis/java-driver public

Prevent wrapping of Driver and InterruptedException in initAsync.
Changesetdbd070d8ca00b675cc582662f0f2b117ffb03e1d0e4fc7a72b62dedc297ea448
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-04-20 01:02 -05:00
CommitterAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-04-20 01:07 -05:00
Parentseb9d2ac7c8ee

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 }