Support combining ping requests of different rooms on the same backend.

This commit is contained in:
Joachim Bauch
2022-05-17 16:38:16 +02:00
parent cdf5cd47cb
commit 800ece1d90
5 changed files with 527 additions and 3 deletions
+1 -3
View File
@@ -829,9 +829,7 @@ func (r *Room) publishActiveSessions() (int, *sync.WaitGroup) {
ctx, cancel := context.WithTimeout(context.Background(), r.hub.backendTimeout)
defer cancel()
request := NewBackendClientPingRequest(r.id, entries)
var response BackendClientResponse
if err := r.hub.backend.PerformJSONRequest(ctx, url, request, &response); err != nil {
if err := r.hub.roomPing.SendPings(ctx, r, url, entries); err != nil {
log.Printf("Error pinging room %s for active entries %+v: %s", r.id, entries, err)
}
}(urls[u], e)