mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Wait for 8h between device list updates for blacklisted servers (#1344)
This commit is contained in:
parent
abd16ff4a0
commit
29d6481842
1 changed files with 6 additions and 2 deletions
|
@ -341,8 +341,12 @@ func (u *DeviceListUpdater) processServer(serverName gomatrixserverlib.ServerNam
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.WithError(err).WithField("user_id", userID).Error("failed to query device keys for user")
|
logger.WithError(err).WithField("user_id", userID).Error("failed to query device keys for user")
|
||||||
fcerr, ok := err.(*fedsenderapi.FederationClientError)
|
fcerr, ok := err.(*fedsenderapi.FederationClientError)
|
||||||
if ok && fcerr.RetryAfter > 0 {
|
if ok {
|
||||||
waitTime = fcerr.RetryAfter
|
if fcerr.RetryAfter > 0 {
|
||||||
|
waitTime = fcerr.RetryAfter
|
||||||
|
} else if fcerr.Blacklisted {
|
||||||
|
waitTime = time.Hour * 8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hasFailures = true
|
hasFailures = true
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue