Check the correct error code in PerformJoin

This commit is contained in:
Devon Hudson 2023-04-25 17:15:46 -06:00
parent 83daf12fe5
commit c0a4599b2f
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -163,13 +163,13 @@ func (r *FederationInternalAPI) performJoinUsingServer(
}
response, joinErr := gomatrixserverlib.PerformJoin(ctx, r, joinInput)
if err != nil {
if joinErr != nil {
if !joinErr.Reachable {
r.statistics.ForServer(joinErr.ServerName).Failure()
} else {
r.statistics.ForServer(joinErr.ServerName).Success(statistics.SendDirect)
}
return err
return joinErr
}
r.statistics.ForServer(serverName).Success(statistics.SendDirect)
if response == nil {