kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | ad54027f9a3c7fbb59f52d73c99bb1001efd00a83dbaefb6d9f6ab8cbd49126f |
|---|---|
| Author | Olivier Michallat <olim7t@users.noreply.github.com> · 2015-04-20 11:01 +02:00 |
| Committer | Olivier Michallat <olim7t@users.noreply.github.com> · 2015-04-20 11:01 +02:00 |
| Parents | eb9d2ac7c8ee, dbd070d8ca00 |
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 | } |