Skip to content

Commit f7ecc5c

Browse files
committed
Free reference to Channel when closing connection.
1 parent 06b9056 commit f7ecc5c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

driver-core/src/main/java/com/datastax/driver/core/Connection.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,11 @@ public ConnectionCloseFuture force() {
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
});

0 commit comments

Comments
 (0)