Wait for 8h between device list updates for blacklisted servers (#1344)

This commit is contained in:
Kegsay 2020-08-26 15:38:21 +01:00 committed by GitHub
parent abd16ff4a0
commit 29d6481842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -341,8 +341,12 @@ func (u *DeviceListUpdater) processServer(serverName gomatrixserverlib.ServerNam
if err != nil {
logger.WithError(err).WithField("user_id", userID).Error("failed to query device keys for user")
fcerr, ok := err.(*fedsenderapi.FederationClientError)
if ok && fcerr.RetryAfter > 0 {
if ok {
if fcerr.RetryAfter > 0 {
waitTime = fcerr.RetryAfter
} else if fcerr.Blacklisted {
waitTime = time.Hour * 8
}
}
hasFailures = true
continue