Reorder shutdown sequence

This commit is contained in:
Ingo Oppermann 2023-12-12 21:26:59 +01:00
parent a330ea6e7f
commit 3af049785c
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -1790,13 +1790,6 @@ func (a *api) stop() {
}
}
// Stop all restream processes
if a.restream != nil {
logger.Info().Log("Stopping all processes ...")
a.restream.Stop()
a.restream = nil
}
// Stop the SRT server
if a.srtserver != nil {
a.log.logger.srt.Info().Log("Stopping ...")
@ -1845,6 +1838,13 @@ func (a *api) stop() {
a.sidecarserver = nil
}
// Stop all restream processes
if a.restream != nil {
logger.Info().Log("Stopping all processes ...")
a.restream.Stop()
a.restream = nil
}
if a.iam != nil {
a.iam.Close()
}