--- a/java/org/apache/tomcat/util/net/NioChannel.java +++ a/java/org/apache/tomcat/util/net/NioChannel.java @@ -120,6 +120,8 @@ public class NioChannel implements ByteChannel{ */ @Override public int write(ByteBuffer src) throws IOException { + // fix BZ 56518, clear thread interrupted status before write to NIO socket. + Thread.interrupted(); return sc.write(src); } --- a/java/org/apache/tomcat/util/net/SecureNioChannel.java +++ a/java/org/apache/tomcat/util/net/SecureNioChannel.java @@ -471,6 +471,8 @@ public class SecureNioChannel extends NioChannel { */ @Override public int write(ByteBuffer src) throws IOException { + // fix BZ 56518, clear thread interrupted status before write to NIO socket. + Thread.interrupted(); if ( src == this.netOutBuffer ) { //we can get here through a recursive call //by using the NioBlockingSelector