mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 07:57:13 +08:00
Add API endpoint to leave cluster gracefully, hard leave on exit
This commit is contained in:
@@ -1654,9 +1654,6 @@ func (a *api) start() error {
|
||||
debug.SetMemoryLimit(math.MaxInt64)
|
||||
}
|
||||
|
||||
//p, _ := psutil.NewProcess(int32(os.Getpid()), false)
|
||||
//a.process = p
|
||||
|
||||
// Start the restream processes
|
||||
restream.Start()
|
||||
|
||||
@@ -1699,7 +1696,7 @@ func (a *api) stop() {
|
||||
}
|
||||
|
||||
if a.cluster != nil {
|
||||
a.cluster.Leave("", "")
|
||||
// Hard shutdown without gracefully leaving the cluster
|
||||
a.cluster.Shutdown()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user