oepnvidu-server: alway set disconnection time on KurentoClientListener

pull/431/head
pabloFuente 2020-04-09 18:34:37 +02:00
parent 151344ce59
commit 8ab37ab97d
1 changed files with 5 additions and 5 deletions

View File

@ -202,6 +202,9 @@ public abstract class KmsManager {
@Override
public void disconnected() {
final Kms kms = kmss.get(kmsId);
kms.setKurentoClientConnected(false);
kms.setTimeOfKurentoClientDisconnection(System.currentTimeMillis());
if(kms.getKurentoClient().isClosed()) {
log.info("Kurento Client \"disconnected\" event for KMS {} [{}]. Closed explicitely", kms.getUri(),
@ -210,10 +213,7 @@ public abstract class KmsManager {
} else {
log.info("Kurento Client \"disconnected\" event for KMS {} [{}]. Waiting reconnection", kms.getUri(),
kms.getKurentoClient().toString());
}
kms.setKurentoClientConnected(false);
kms.setTimeOfKurentoClientDisconnection(System.currentTimeMillis());
}
// TODO: this is a fix for the lack of reconnected event
kmsReconnectionLocks.putIfAbsent(kms.getId(), new ReentrantLock());
@ -242,7 +242,7 @@ public abstract class KmsManager {
timer.cancel();
return;
}
kms.getKurentoClient().getServerManager().getInfo();
log.info("According to Timer KMS with uri {} and KurentoClient [{}] is now reconnected",
kms.getUri(), kms.getKurentoClient().toString());