Hi,

I've been looking at how we close NIO channels and I think there is an
opportunity for a little clean-up that, in turn, may allow a little
de-duplication between NIO and NIO2.

Currently, in various places in the codebase we close an NIO channel
using some variation of:

channel.socket().close();
channel.close();

My reading of the Javadoc, source code and some debugging suggests that
these lines are equivalent and that we can simply do:

channel.close();

Across the codebase, you end up with a patch like this:
http://people.apache.org/~markt/patches/2018-01-11-channel-close-tc9-v1.patch

Before I apply this patch to trunk, can anyone see anything I am missing
here? Is there a reason to keep the code as it is?

Cheers,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to