mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-22 19:51:39 +00:00
Don't give up if we fail to fetch a key (#1483)
* Don't give up if we fail to fetch a key * Fix logging line * furl nolint
This commit is contained in:
parent
ee79d662e7
commit
4feff8e8d9
@ -20,6 +20,7 @@ var requestFrom = flag.String("from", "", "the server name that the request shou
|
|||||||
var requestKey = flag.String("key", "matrix_key.pem", "the private key to use when signing the request")
|
var requestKey = flag.String("key", "matrix_key.pem", "the private key to use when signing the request")
|
||||||
var requestPost = flag.Bool("post", false, "send a POST request instead of GET (pipe input into stdin or type followed by Ctrl-D)")
|
var requestPost = flag.Bool("post", false, "send a POST request instead of GET (pipe input into stdin or type followed by Ctrl-D)")
|
||||||
|
|
||||||
|
// nolint:gocyclo
|
||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ func (r *Backfiller) fetchAndStoreMissingEvents(ctx context.Context, roomVer gom
|
|||||||
logger.Infof("returned %d PDUs which made events %+v", len(res.PDUs), result)
|
logger.Infof("returned %d PDUs which made events %+v", len(res.PDUs), result)
|
||||||
for _, res := range result {
|
for _, res := range result {
|
||||||
if res.Error != nil {
|
if res.Error != nil {
|
||||||
logger.WithError(err).Warn("event failed PDU checks")
|
logger.WithError(res.Error).Warn("event failed PDU checks")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
missingMap[id] = res.Event
|
missingMap[id] = res.Event
|
||||||
|
@ -98,10 +98,6 @@ func (s *ServerKeyAPI) FetchKeys(
|
|||||||
// we've failed to satisfy it from local keys, database keys or from
|
// we've failed to satisfy it from local keys, database keys or from
|
||||||
// all of the fetchers. Report an error.
|
// all of the fetchers. Report an error.
|
||||||
logrus.Warnf("Failed to retrieve key %q for server %q", req.KeyID, req.ServerName)
|
logrus.Warnf("Failed to retrieve key %q for server %q", req.KeyID, req.ServerName)
|
||||||
return results, fmt.Errorf(
|
|
||||||
"server key API failed to satisfy key request for server %q key ID %q",
|
|
||||||
req.ServerName, req.KeyID,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user