Fix federation API condition

This commit is contained in:
Neil Alexander 2022-10-25 13:36:51 +01:00
parent 193e241f8d
commit 987c21ccf9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 1 additions and 2 deletions

View file

@ -209,7 +209,6 @@ func TestRenewalBehaviour(t *testing.T) {
// then repeating a key fetch should cause us to try and renew the key.
// If so, then the new key will end up in our cache.
serverC.renew()
time.Sleep(time.Second / 2)
res, err = serverA.api.FetchKeys(
context.Background(),

View file

@ -99,7 +99,7 @@ func (s *FederationInternalAPI) handleLocalKeys(
results map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult,
) {
for req := range requests {
if s.cfg.Matrix.IsLocalServerName(req.ServerName) {
if !s.cfg.Matrix.IsLocalServerName(req.ServerName) {
continue
}
if req.KeyID == s.cfg.Matrix.KeyID {