Skip to content

Commit 4839767

Browse files
committed
Added check container ok
1 parent 8fcdb40 commit 4839767

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

JShellAPI/src/main/java/org/togetherjava/jshellapi/service/JShellService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,13 @@ private void updateLastTimeout() {
207207

208208
private void checkContainerOK() throws DockerException {
209209
try {
210+
if(dockerService.isDead(containerName())) {
211+
try {
212+
close();
213+
} finally {
214+
throw new DockerException("Container of session " + id + " is dead");
215+
}
216+
}
210217
String OK = reader.readLine();
211218
if(OK == null) {
212219
try {

0 commit comments

Comments
 (0)