mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Check the correct error code in PerformJoin
This commit is contained in:
parent
83daf12fe5
commit
c0a4599b2f
|
|
@ -163,13 +163,13 @@ func (r *FederationInternalAPI) performJoinUsingServer(
|
||||||
}
|
}
|
||||||
response, joinErr := gomatrixserverlib.PerformJoin(ctx, r, joinInput)
|
response, joinErr := gomatrixserverlib.PerformJoin(ctx, r, joinInput)
|
||||||
|
|
||||||
if err != nil {
|
if joinErr != nil {
|
||||||
if !joinErr.Reachable {
|
if !joinErr.Reachable {
|
||||||
r.statistics.ForServer(joinErr.ServerName).Failure()
|
r.statistics.ForServer(joinErr.ServerName).Failure()
|
||||||
} else {
|
} else {
|
||||||
r.statistics.ForServer(joinErr.ServerName).Success(statistics.SendDirect)
|
r.statistics.ForServer(joinErr.ServerName).Success(statistics.SendDirect)
|
||||||
}
|
}
|
||||||
return err
|
return joinErr
|
||||||
}
|
}
|
||||||
r.statistics.ForServer(serverName).Success(statistics.SendDirect)
|
r.statistics.ForServer(serverName).Success(statistics.SendDirect)
|
||||||
if response == nil {
|
if response == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue