diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dendrite-demo-libp2p/main.go | 3 | ||||
-rw-r--r-- | cmd/dendrite-demo-yggdrasil/main.go | 4 | ||||
-rw-r--r-- | cmd/dendrite-monolith-server/main.go | 3 | ||||
-rw-r--r-- | cmd/dendrite-polylith-multi/main.go | 3 | ||||
-rw-r--r-- | cmd/dendrite-polylith-multi/personalities/syncapi.go | 1 | ||||
-rw-r--r-- | cmd/dendritejs/main.go | 1 |
6 files changed, 11 insertions, 4 deletions
diff --git a/cmd/dendrite-demo-libp2p/main.go b/cmd/dendrite-demo-libp2p/main.go index 31e7739a..0610ec77 100644 --- a/cmd/dendrite-demo-libp2p/main.go +++ b/cmd/dendrite-demo-libp2p/main.go @@ -192,6 +192,7 @@ func main() { ExtPublicRoomsProvider: provider, } monolith.AddAllPublicRoutes( + base.Base.ProcessContext, base.Base.PublicClientAPIMux, base.Base.PublicFederationAPIMux, base.Base.PublicKeyAPIMux, @@ -234,5 +235,5 @@ func main() { } // We want to block forever to let the HTTP and HTTPS handler serve the APIs - select {} + base.Base.WaitForShutdown() } diff --git a/cmd/dendrite-demo-yggdrasil/main.go b/cmd/dendrite-demo-yggdrasil/main.go index aea6f7c4..8091298b 100644 --- a/cmd/dendrite-demo-yggdrasil/main.go +++ b/cmd/dendrite-demo-yggdrasil/main.go @@ -150,6 +150,7 @@ func main() { ), } monolith.AddAllPublicRoutes( + base.ProcessContext, base.PublicClientAPIMux, base.PublicFederationAPIMux, base.PublicKeyAPIMux, @@ -200,5 +201,6 @@ func main() { } }() - select {} + // We want to block forever to let the HTTP and HTTPS handler serve the APIs + base.WaitForShutdown() } diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index 55bac6fe..b82f7321 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -144,6 +144,7 @@ func main() { KeyAPI: keyAPI, } monolith.AddAllPublicRoutes( + base.ProcessContext, base.PublicClientAPIMux, base.PublicFederationAPIMux, base.PublicKeyAPIMux, @@ -176,5 +177,5 @@ func main() { } // We want to block forever to let the HTTP and HTTPS handler serve the APIs - select {} + base.WaitForShutdown() } diff --git a/cmd/dendrite-polylith-multi/main.go b/cmd/dendrite-polylith-multi/main.go index 979ab436..d3c52967 100644 --- a/cmd/dendrite-polylith-multi/main.go +++ b/cmd/dendrite-polylith-multi/main.go @@ -74,5 +74,6 @@ func main() { base := setup.NewBaseDendrite(cfg, component, false) // TODO defer base.Close() // nolint: errcheck - start(base, cfg) + go start(base, cfg) + base.WaitForShutdown() } diff --git a/cmd/dendrite-polylith-multi/personalities/syncapi.go b/cmd/dendrite-polylith-multi/personalities/syncapi.go index 1c33286e..b9b20229 100644 --- a/cmd/dendrite-polylith-multi/personalities/syncapi.go +++ b/cmd/dendrite-polylith-multi/personalities/syncapi.go @@ -27,6 +27,7 @@ func SyncAPI(base *setup.BaseDendrite, cfg *config.Dendrite) { rsAPI := base.RoomserverHTTPClient() syncapi.AddPublicRoutes( + base.ProcessContext, base.PublicClientAPIMux, userAPI, rsAPI, base.KeyServerHTTPClient(), federation, &cfg.SyncAPI, diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go index b77d141d..0dfa4681 100644 --- a/cmd/dendritejs/main.go +++ b/cmd/dendritejs/main.go @@ -231,6 +231,7 @@ func main() { ExtPublicRoomsProvider: p2pPublicRoomProvider, } monolith.AddAllPublicRoutes( + base.ProcessContext, base.PublicClientAPIMux, base.PublicFederationAPIMux, base.PublicKeyAPIMux, |