mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-03 04:03:09 -06:00
Don't duplicate wait-for-shutdowns
This commit is contained in:
parent
1b9084744c
commit
6fe1ac2c9e
|
|
@ -469,14 +469,12 @@ func (b *BaseDendrite) SetupAndServeHTTP(
|
||||||
}
|
}
|
||||||
|
|
||||||
minwinsvc.SetOnExit(b.ProcessContext.ShutdownDendrite)
|
minwinsvc.SetOnExit(b.ProcessContext.ShutdownDendrite)
|
||||||
|
|
||||||
<-b.ProcessContext.WaitForShutdown()
|
<-b.ProcessContext.WaitForShutdown()
|
||||||
|
|
||||||
logrus.Infof("Stopping HTTP listeners")
|
logrus.Infof("Stopping HTTP listeners")
|
||||||
_ = internalServ.Shutdown(context.Background())
|
_ = internalServ.Shutdown(context.Background())
|
||||||
_ = externalServ.Shutdown(context.Background())
|
_ = externalServ.Shutdown(context.Background())
|
||||||
logrus.Infof("Stopped HTTP listeners")
|
logrus.Infof("Stopped HTTP listeners")
|
||||||
|
|
||||||
b.WaitForShutdown()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BaseDendrite) WaitForShutdown() {
|
func (b *BaseDendrite) WaitForShutdown() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue