Don't remove container if it does not exists

This commit is contained in:
cruizba 2020-07-03 10:28:43 +02:00
parent df314ba6e2
commit cf2b37414f

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