mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: clean activeRecorders map of SingleStreamRecordingService
parent
fac8693e2f
commit
3e9eef2d27
|
@ -184,7 +184,7 @@ public class SingleStreamRecordingService extends RecordingService {
|
||||||
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
|
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
|
||||||
finalRecordingArray[0].getStatus());
|
finalRecordingArray[0].getStatus());
|
||||||
|
|
||||||
storedRecorders.remove(finalRecordingArray[0].getSessionId());
|
cleanRecordingWrappers(finalRecordingArray[0].getSessionId());
|
||||||
|
|
||||||
// Decrement active recordings once it is downloaded
|
// Decrement active recordings once it is downloaded
|
||||||
((KurentoSession) session).getKms().getActiveRecordings().decrementAndGet();
|
((KurentoSession) session).getKms().getActiveRecordings().decrementAndGet();
|
||||||
|
@ -195,7 +195,7 @@ public class SingleStreamRecordingService extends RecordingService {
|
||||||
});
|
});
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Error while downloading recording {}", finalRecordingArray[0].getName());
|
log.error("Error while downloading recording {}", finalRecordingArray[0].getName());
|
||||||
storedRecorders.remove(finalRecordingArray[0].getSessionId());
|
cleanRecordingWrappers(finalRecordingArray[0].getSessionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reason != null && session != null) {
|
if (reason != null && session != null) {
|
||||||
|
@ -504,4 +504,9 @@ public class SingleStreamRecordingService extends RecordingService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cleanRecordingWrappers(String sessionId) {
|
||||||
|
this.storedRecorders.remove(sessionId);
|
||||||
|
this.activeRecorders.remove(sessionId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue