mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Fix issue with stale device lists (#2702)
We were only sending the last entry to the worker, so most likely missed updates.
This commit is contained in:
parent
d5876abbe9
commit
42a82091a8
2 changed files with 22 additions and 4 deletions
|
@ -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,
|
||||
}
|
||||
default:
|
||||
case *url.Error: // e.g. certificate error, unable to connect
|
||||
return &api.FederationClientError{
|
||||
Err: err.Error(),
|
||||
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(),
|
||||
Code: 400,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue