}</BUG>
}
protected abstract boolean isFinished();
@Override
public void resumeReads() {
<BUG>if (isFinished() && minusOneReturned) {
return;</BUG>
}
<BUG>if (isFinished()) {
runReadListener();
} else {</BUG>
delegate.resumeReads();

import io.undertow.UndertowMessages;
public abstract class DetachableStreamSourceChannel implements StreamSourceChannel{
protected final StreamSourceChannel delegate;
protected ChannelListener.SimpleSetter<DetachableStreamSourceChannel> readSetter;
protected ChannelListener.SimpleSetter<DetachableStreamSourceChannel> closeSetter;
public DetachableStreamSourceChannel(final StreamSourceChannel delegate) {
this.delegate = delegate;
}
protected abstract boolean isFinished();
@Override
public void resumeReads() {
if (isFinished()) {
return;
