mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Limit the number of servers we attempt to reduce backpressure
This commit is contained in:
parent
d0ee9f9841
commit
8a2c565385
|
|
@ -135,6 +135,9 @@ func (r *Inputer) processRoomEvent(
|
||||||
if input.Origin != "" {
|
if input.Origin != "" {
|
||||||
serverRes.ServerNames = append([]gomatrixserverlib.ServerName{input.Origin}, serverRes.ServerNames...)
|
serverRes.ServerNames = append([]gomatrixserverlib.ServerName{input.Origin}, serverRes.ServerNames...)
|
||||||
}
|
}
|
||||||
|
if len(serverRes.ServerNames) > 5 {
|
||||||
|
serverRes.ServerNames = serverRes.ServerNames[:5]
|
||||||
|
}
|
||||||
|
|
||||||
// First of all, check that the auth events of the event are known.
|
// First of all, check that the auth events of the event are known.
|
||||||
// If they aren't then we will ask the federation API for them.
|
// If they aren't then we will ask the federation API for them.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue