0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 09:03:46 +01:00

Disable proactive sends for remote joins (#12330)

Do not attempt to send remote joins out over federation. Normally, it will do
nothing; occasionally, it will do the wrong thing.
This commit is contained in:
Richard van der Hoff 2022-03-30 12:04:35 +01:00 committed by GitHub
parent 437a8ed9ef
commit 9b67715bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

1
changelog.d/12330.misc Normal file
View file

@ -0,0 +1 @@
Avoid trying to calculate the state at outlier events.

View file

@ -469,6 +469,12 @@ class FederationEventHandler:
if context.rejected:
raise SynapseError(400, "Join event was rejected")
# the remote server is responsible for sending our join event to the rest
# of the federation. Indeed, attempting to do so will result in problems
# when we try to look up the state before the join (to get the server list)
# and discover that we do not have it.
event.internal_metadata.proactively_send = False
return await self.persist_events_and_notify(room_id, [(event, context)])
async def backfill(