diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-09-08 12:03:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 12:03:44 +0200 |
commit | 42a82091a8932fd92e36ba41c644c2058ab7dce6 (patch) | |
tree | b8bec0a8be8af73d3fcc8d212269f003064f50d0 /federationapi | |
parent | d5876abbe9f5484768f603ec91a567b8650e6e73 (diff) |
Fix issue with stale device lists (#2702)
We were only sending the last entry to the worker, so most likely missed
updates.
Diffstat (limited to 'federationapi')
-rw-r--r-- | federationapi/inthttp/server.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/federationapi/inthttp/server.go b/federationapi/inthttp/server.go index 58ea9ddc..7aa0e480 100644 --- a/federationapi/inthttp/server.go +++ b/federationapi/inthttp/server.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "net/http" + "net/url" "github.com/gorilla/mux" "github.com/matrix-org/gomatrix" @@ -235,9 +236,17 @@ func federationClientError(err error) error { return &api.FederationClientError{ Code: ferr.Code, } + case *url.Error: // e.g. certificate error, unable to connect + return &api.FederationClientError{ + Err: ferr.Error(), + Code: 400, + } default: + // We don't know what exactly failed, but we probably don't + // want to retry the request immediately in the device list updater return &api.FederationClientError{ - Err: err.Error(), + Err: err.Error(), + Code: 400, } } } |