mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 20:03:10 -06:00
Simplify error handling for recursion
This commit is contained in:
parent
bc8abbc51d
commit
f26f7c5cc8
|
|
@ -220,19 +220,16 @@ retryAllowedState:
|
||||||
if s.EventID() != missing.AuthEventID {
|
if s.EventID() != missing.AuthEventID {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if serr := t.processEventWithMissingState(s); serr == nil {
|
err = t.processEventWithMissingState(s)
|
||||||
// If there was no error retrieving the event from federation then
|
// If there was no error retrieving the event from federation then
|
||||||
// we assume that it succeeded, so retry the original state check
|
// we assume that it succeeded, so retry the original state check
|
||||||
|
if err == nil {
|
||||||
goto retryAllowedState
|
goto retryAllowedState
|
||||||
} else {
|
|
||||||
// An error occurred so let's not do anything further
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
// Some other error condition happened that wasn't a missing auth event
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
// pass the event along with the state to the roomserver
|
// pass the event along with the state to the roomserver
|
||||||
return t.producer.SendEventWithState(t.context, state, e)
|
return t.producer.SendEventWithState(t.context, state, e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue