Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2015-09-15 16:41:37 +0000
committerJeff Johnston2015-09-15 19:10:29 +0000
commite277da29e4338852fed77e31005e732c16b3a03b (patch)
tree959f82c58a2069b2bbf03b1bf9f51629d23691d6
parenteb2ce29a6af56fed00d61abd9d61424a764e4a66 (diff)
downloadorg.eclipse.linuxtools-e277da29e4338852fed77e31005e732c16b3a03b.tar.gz
org.eclipse.linuxtools-e277da29e4338852fed77e31005e732c16b3a03b.tar.xz
org.eclipse.linuxtools-e277da29e4338852fed77e31005e732c16b3a03b.zip
Bug 477485: Work around socket read timeout in docker-client for logs.
This is closely related to 67a20d (Bug 469717) but resolves the same issue for the stream returned by logs(). Change-Id: I5a4519d666238afe8584f7980bfc7a180a0569be Reviewed-on: https://git.eclipse.org/r/56012 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index 001243cd22..f59d585104 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -828,7 +828,15 @@ public class DockerConnection implements IDockerConnection, Closeable {
Activator.logErrorMessage(e.getMessage());
throw new InterruptedException();
} catch (Exception e) {
- Activator.logErrorMessage(e.getMessage());
+ /*
+ * Temporary workaround for BZ #477485
+ * Remove when docker-client logs() uses noTimeoutClient.
+ */
+ if (e.getCause() instanceof SocketTimeoutException) {
+ execute();
+ } else {
+ Activator.logErrorMessage(e.getMessage());
+ }
} finally {
follow = false;
copyClient.close(); // we are done with copyClient..dispose

Back to the top