mirror of https://github.com/OpenVidu/openvidu.git
openviu-server: close KurentoClients in KmsManager on PreDestroy
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…
Reference in New Issue