kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 45a7e96c0cf9ceedcad113570a71946efe0d52bf1c09e7b1c41e29c1d49f2cf9 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-12-14 18:15 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-12-14 18:15 +01:00 |
| Parents | dd058c9e3c8f |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +2 −9
| @@ -259,15 +259,8 @@ | ||
| 259 | 259 | // sure the "suspected" mechanism work as expected |
| 260 | 260 | Host host = factory.manager.metadata.getHost(address); |
| 261 | 261 | if (host != null) { |
| 262 | - // If we get an error on a host that was already DOWN or SUSPECTED, this is a reconnection attempt. | |
| 263 | - // We don't want to signal, because that would invoke triggerOnDown unnecessarily (the host's bad | |
| 264 | - // condition is already taken care of by the reattempt in progress) | |
| 265 | - boolean isReconnectionAttempt = (host.state == Host.State.DOWN || host.state == Host.State.SUSPECT) | |
| 266 | - && !(this instanceof PooledConnection); | |
| 267 | - if (!isReconnectionAttempt) { | |
| 268 | - boolean isDown = factory.manager.signalConnectionFailure(host, ce, host.wasJustAdded(), isInitialized); | |
| 269 | - notifyOwnerWhenDefunct(isDown); | |
| 270 | - } | |
| 262 | + boolean isDown = factory.manager.signalConnectionFailure(host, ce, host.wasJustAdded(), isInitialized); | |
| 263 | + notifyOwnerWhenDefunct(isDown); | |
| 271 | 264 | } |
| 272 | 265 | |
| 273 | 266 | // Force the connection to close to make sure the future completes. Otherwise force() might never get called and |