kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 7857e4b97bd65ab03f2d4a79c2d3ae101fe8a9c00ef3350c4a760ba6e90b22f2 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2016-03-31 15:44 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-03-31 15:44 +02:00 |
| Parents | 8e2317fde2d3 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +5 −5
| @@ -88,7 +88,7 @@ | ||
| 88 | 88 | r.cancel(false); |
| 89 | 89 | |
| 90 | 90 | Connection connection = connectionRef.get(); |
| 91 | - return connection == null ? CloseFuture.immediateFuture() : connection.closeAsync(); | |
| 91 | + return connection == null ? CloseFuture.immediateFuture() : connection.closeAsync().force(); | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | Host connectedHost() { |
| @@ -136,7 +136,7 @@ | ||
| 136 | 136 | @Override |
| 137 | 137 | protected void onReconnection(Connection connection) { |
| 138 | 138 | if (isShutdown) { |
| 139 | - connection.closeAsync(); | |
| 139 | + connection.closeAsync().force(); | |
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | |
| @@ -170,7 +170,7 @@ | ||
| 170 | 170 | private void signalError() { |
| 171 | 171 | Connection connection = connectionRef.get(); |
| 172 | 172 | if (connection != null) |
| 173 | - connection.closeAsync(); | |
| 173 | + connection.closeAsync().force(); | |
| 174 | 174 | |
| 175 | 175 | // If the error caused the host to go down, onDown might have already triggered a reconnect. |
| 176 | 176 | // But backgroundReconnect knows how to deal with that. |
| @@ -182,7 +182,7 @@ | ||
| 182 | 182 | newConnection.setOwner(this); |
| 183 | 183 | Connection old = connectionRef.getAndSet(newConnection); |
| 184 | 184 | if (old != null && !old.isClosed()) |
| 185 | - old.closeAsync(); | |
| 185 | + old.closeAsync().force(); | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | private Connection reconnectInternal(Iterator<Host> iter, boolean isInitialConnection) throws UnsupportedProtocolVersionException { |
| @@ -717,7 +717,7 @@ | ||
| 717 | 717 | logger.debug("[Control connection] {} is down/removed and it was the control host, triggering reconnect", |
| 718 | 718 | current.address); |
| 719 | 719 | if (!current.isClosed()) |
| 720 | - current.closeAsync(); | |
| 720 | + current.closeAsync().force(); | |
| 721 | 721 | backgroundReconnect(0); |
| 722 | 722 | } |
| 723 | 723 | } |