From 668a722ee0e85b1f058962bd4df96ae542018a23 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 8 Sep 2020 13:41:08 +0100 Subject: Backoff for 401s (#1410) * Backoff for 401s * Human-readable retry_after in logs --- federationsender/internal/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'federationsender/internal') diff --git a/federationsender/internal/api.go b/federationsender/internal/api.go index 61663be3..2a70f7ed 100644 --- a/federationsender/internal/api.go +++ b/federationsender/internal/api.go @@ -70,7 +70,10 @@ func failBlacklistableError(err error, stats *statistics.ServerStatistics) (unti if !ok { return stats.Failure() } - if mxerr.Code >= 500 && mxerr.Code < 600 { + if mxerr.Code == 401 { // invalid signature in X-Matrix header + return stats.Failure() + } + if mxerr.Code >= 500 && mxerr.Code < 600 { // internal server errors return stats.Failure() } return -- cgit v1.2.3