Defer keyserver and federationsender wakeups to give HTTP listeners time to start (#1389)

This commit is contained in:
Neil Alexander 2020-09-03 21:17:55 +01:00 committed by GitHub
parent 33b8143a95
commit 04bc09f591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 21 deletions

View file

@ -48,10 +48,11 @@ func NewInternalAPI(
DB: db,
}
updater := internal.NewDeviceListUpdater(db, keyChangeProducer, fedClient, 8) // 8 workers TODO: configurable
err = updater.Start()
if err != nil {
logrus.WithError(err).Panicf("failed to start device list updater")
}
go func() {
if err := updater.Start(); err != nil {
logrus.WithError(err).Panicf("failed to start device list updater")
}
}()
return &internal.KeyInternalAPI{
DB: db,
ThisServer: cfg.Matrix.ServerName,