kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | dbd070d8ca00b675cc582662f0f2b117ffb03e1d0e4fc7a72b62dedc297ea448 |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-04-20 01:02 -05:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-04-20 01:07 -05:00 |
| Parents | eb9d2ac7c8ee |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +3 −3
| @@ -182,12 +182,12 @@ | ||
| 182 | 182 | future.setException(t); |
| 183 | 183 | } else { |
| 184 | 184 | // 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 | |
| 187 | 187 | : new ConnectionException(Connection.this.address, |
| 188 | 188 | String.format("Unexpected error during transport initialization (%s)", t), |
| 189 | 189 | t); |
| 190 | - future.setException(defunct(ce)); | |
| 190 | + future.setException(defunct(e)); | |
| 191 | 191 | } |
| 192 | 192 | return future; |
| 193 | 193 | } |