openviu-server: close KurentoClients in KmsManager on PreDestroy
This commit is contained in:
parent
63b61b0e56
commit
8f67cd9d9e
@ -26,6 +26,7 @@ import java.util.NoSuchElementException;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.kurento.client.KurentoConnectionListener;
|
||||
import org.slf4j.Logger;
|
||||
@ -197,4 +198,12 @@ public abstract class KmsManager {
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void close() {
|
||||
log.info("Closing all KurentoClients");
|
||||
this.kmss.values().forEach(kms -> {
|
||||
kms.getKurentoClient().destroy();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user