mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2023-10-21 07:33:40 -05:00
Update capabilities if no hello v2 token key is found in cache.
This is necessary to detect updated Talk setups where the signaling server might have cached capabilities without the v2 token key but the clients are trying to connect with a hello v2 token. Fetch updated capabilities in such cases (but throttle to about one invalidation per minute).
This commit is contained in:
+2
-2
@@ -119,7 +119,7 @@ func (p *RoomPing) publishEntries(entries *pingEntries, timeout time.Duration) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
limit, found := p.capabilities.GetIntegerConfig(ctx, entries.url, ConfigGroupSignaling, ConfigKeySessionPingLimit)
|
||||
limit, _, found := p.capabilities.GetIntegerConfig(ctx, entries.url, ConfigGroupSignaling, ConfigKeySessionPingLimit)
|
||||
if !found || limit <= 0 {
|
||||
// Limit disabled while waiting for the next iteration, fallback to sending
|
||||
// one request per room.
|
||||
@@ -188,7 +188,7 @@ func (p *RoomPing) sendPingsCombined(url *url.URL, entries []BackendPingEntry, l
|
||||
}
|
||||
|
||||
func (p *RoomPing) SendPings(ctx context.Context, room *Room, url *url.URL, entries []BackendPingEntry) error {
|
||||
limit, found := p.capabilities.GetIntegerConfig(ctx, url, ConfigGroupSignaling, ConfigKeySessionPingLimit)
|
||||
limit, _, found := p.capabilities.GetIntegerConfig(ctx, url, ConfigGroupSignaling, ConfigKeySessionPingLimit)
|
||||
if !found || limit <= 0 {
|
||||
// Old-style Nextcloud or session limit not configured. Perform one request
|
||||
// per room. Don't queue to avoid sending all ping requests to old-style
|
||||
|
||||
Reference in New Issue
Block a user