blob: 63fb18ba9052caa85e002066a0bcfb6a76b07c43 [file] [log] [blame]
/*
*/
package org.apache.tomcat.lite.proxy;
import java.io.IOException;
import org.apache.tomcat.lite.io.IOChannel;
import org.apache.tomcat.lite.io.IOConnector;
public final class ProxyFlushedCallback implements IOConnector.DataFlushedCallback {
IOChannel peerCh;
public ProxyFlushedCallback(IOChannel ch2, IOChannel clientChannel2) {
peerCh = ch2;
}
@Override
public void handleFlushed(IOChannel ch) throws IOException {
if (ch.getOut().isClosedAndEmpty()) {
if (!peerCh.getOut().isAppendClosed()) {
peerCh.close();
}
}
}
}