Don't call is.close() as it is already done by request.abort()
@@ -30,7 +30,6 @@ import io.fabric8.maven.docker.access.DockerAccessException;
import io.fabric8.maven.docker.access.UrlBuilder;
import io.fabric8.maven.docker.access.util.RequestUtil;
import io.fabric8.maven.docker.util.TimestampFactory;
-import io.fabric8.maven.docker.wait.WaitUtil;
import org.apache.commons.codec.binary.Hex;
import org.apache.http.HttpResponse;
@@ -185,24 +184,11 @@ public class LogRequestor extends Thread implements LogGetHandle {
final InputStream is = response.getEntity().getContent();
- try {
while (true) {
if (!readStreamFrame(is)) {
return;
}
}
- } finally {
- // When finish() returns, request == null
- while (request != null) {
- WaitUtil.sleep(500);
- }
-
- if ((is != null)) {
- System.out.println("*** Calling is.close...");
- is.close();
- System.out.println("*** Calling is.close: done.");
- }
- }
}
private void callLogCallback(int type, String txt) throws LogCallback.DoneException {
@@ -224,9 +210,7 @@ public class LogRequestor extends Thread implements LogGetHandle {
@Override
public void finish() {
if (request != null) {
- System.out.println("*** Calling request.abort...");
request.abort();
- System.out.println("*** Calling request.abort: done.");
request = null;
}
}
