Elffuss BraidHub

kikocis/java-driver public

Free reference to Channel when closing connection.
Changeset0fe9369e8f1bb3697421ea61d0486bf3e29ece7fe353709e55acbdab229d297a
Authorolim7t <omichallat+github@gmail.com> · 2014-12-18 21:44 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2014-12-19 00:22 +01:00
Parents14b391abab4f

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +4 −2
@@ -754,9 +754,11 @@
754754 ChannelFuture future = channel.close();
755755 future.addListener(new ChannelFutureListener() {
756756 public void operationComplete(ChannelFuture future) {
757- if (future.getCause() != null)
757+ factory.allChannels.remove(channel);
758+ if (future.getCause() != null) {
759+ logger.warn("Error closing channel", future.getCause());
758760 ConnectionCloseFuture.this.setException(future.getCause());
759- else
761+ } else
760762 ConnectionCloseFuture.this.set(null);
761763 }
762764 });