}
if (res == -1) {
try {
channel.shutdownReads();
final StreamSinkChannel responseChannel = connection.getChannel().getSinkChannel();
responseChannel.shutdownWrites();
// will return false if there's a response queued ahead of this one, so we'll set up a listener then
if (!responseChannel.flush()) {
responseChannel.getWriteSetter().set(ChannelListeners.flushingChannelListener(null, null));
responseChannel.resumeWrites();
}