Don't remove container if it does not exists

pull/508/head
cruizba 2020-07-03 10:28:43 +02:00
parent df314ba6e2
commit cf2b37414f
1 changed files with 9 additions and 6 deletions

View File

@ -31,14 +31,17 @@ public class ComposedQuickStartRecordingService extends ComposedRecordingService
String containerId = this.sessionsContainers.get(session.getSessionId());
try {
dockerManager.removeDockerContainer(containerId, true);
} catch (Exception e) {
log.error("Can't remove COMPOSED_QUICK_START recording container from session {}", session.getSessionId());
if (containerId != null) {
try {
dockerManager.removeDockerContainer(containerId, true);
} catch (Exception e) {
log.error("Can't remove COMPOSED_QUICK_START recording container from session {}", session.getSessionId());
}
containers.remove(containerId);
sessionsContainers.remove(session.getSessionId());
}
containers.remove(containerId);
sessionsContainers.remove(session.getSessionId());
}
@Override