kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 7327bc67fe0628cbce462dfa2038bcac32c196e9d87c7003870856e94d282a3f |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-03-27 18:42 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-03-30 15:59 +02:00 |
| Parents | 5e4320ed3019 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +1 −1
| @@ -115,12 +115,12 @@ | ||
| 115 | 115 | try { |
| 116 | 116 | // Wait until the connection attempt succeeds or fails. |
| 117 | 117 | this.channel = future.awaitUninterruptibly().channel(); |
| 118 | - this.factory.allChannels.add(this.channel); | |
| 119 | 118 | if (!future.isSuccess()) { |
| 120 | 119 | if (logger.isDebugEnabled()) |
| 121 | 120 | logger.debug(String.format("%s Error connecting to %s%s", this, address, extractMessage(future.cause()))); |
| 122 | 121 | throw defunct(new TransportException(address, "Cannot connect", future.cause())); |
| 123 | 122 | } |
| 123 | + this.factory.allChannels.add(this.channel); | |
| 124 | 124 | channel.closeFuture().addListener(new ChannelCloseListener()); |
| 125 | 125 | } finally { |
| 126 | 126 | writer.decrementAndGet(); |