@Override public final void close() throws IOException { if (closed.compareAndSet(false, true)) { channelReference.decRef(); } }