Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public Optional<List<String>> snippets(boolean includeStartupScript) throws Dock
}
return Optional.of(includeStartupScript ? snippets
: snippets.subList(startupScriptSize, snippets.size()));
} catch (IOException ex) {
} catch (Exception ex) {
LOGGER.warn("Unexpected error.", ex);
close();
throw new DockerException(ex);
Expand Down Expand Up @@ -234,30 +234,15 @@ private void updateLastTimeout() {
private void checkContainerOK() throws DockerException {
try {
if (dockerService.isDead(containerName())) {
try {
close();
} finally {
throw new DockerException("Container of session " + id + " is dead");
}
throw new IOException("Container of session " + id + " is dead");
}
String OK = reader.readLine();
if (OK == null) {
try {
close();
} finally {
throw new DockerException("Container of session " + id + " is dead");
}
}
if (!OK.equals("OK")) {
try {
close();
} finally {
throw new DockerException(
"Container of session " + id + " returned invalid info : " + OK);
}
String ok = reader.readLine();
if (ok == null || !ok.equals("OK")) {
throw new IOException(
"Container of session " + id + " is dead because status was " + ok);
}
} catch (IOException ex) {
LOGGER.warn("Unexpected error.", ex);
close();
throw new DockerException(ex);
}
}
Expand Down