openvidu-server: fix NullPointer on stop composite recording

pull/550/head
pabloFuente 2020-10-13 14:35:41 +02:00
parent dfa12ffbb8
commit 3daf4a2ec1
1 changed files with 3 additions and 3 deletions

View File

@ -86,8 +86,8 @@ public class CompositeWrapper {
this.recorderEndpoint.record(); this.recorderEndpoint.record();
} }
public synchronized void stopCompositeRecording(CountDownLatch stopLatch, Long timeOfKmsDisconnection) { public synchronized void stopCompositeRecording(CountDownLatch stopLatch, Long kmsDisconnectionTime) {
if (timeOfKmsDisconnection == 0) { if (kmsDisconnectionTime == null) {
this.recorderEndpoint.addStoppedListener(new EventListener<StoppedEvent>() { this.recorderEndpoint.addStoppedListener(new EventListener<StoppedEvent>() {
@Override @Override
public void onEvent(StoppedEvent event) { public void onEvent(StoppedEvent event) {
@ -101,7 +101,7 @@ public class CompositeWrapper {
}); });
this.recorderEndpoint.stop(); this.recorderEndpoint.stop();
} else { } else {
endTime = timeOfKmsDisconnection; endTime = kmsDisconnectionTime;
stopLatch.countDown(); stopLatch.countDown();
log.warn("Forcing composed audio-only recording stop after KMS restart in session {}", log.warn("Forcing composed audio-only recording stop after KMS restart in session {}",
this.session.getSessionId()); this.session.getSessionId());