Skip to content
Snippets Groups Projects
Unverified Commit a219ce87 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Use directory server for room joins (#3899)

When we do a join, always try the server we used for the alias lookup first.

Fixes #2418
parent 31c15dcb
No related branches found
No related tags found
No related merge requests found
When we join a room, always try the server we used for the alias lookup first, to avoid unresponsive and out-of-date servers.
......@@ -583,6 +583,11 @@ class RoomMemberHandler(object):
room_id = mapping["room_id"]
servers = mapping["servers"]
# put the server which owns the alias at the front of the server list.
if room_alias.domain in servers:
servers.remove(room_alias.domain)
servers.insert(0, room_alias.domain)
defer.returnValue((RoomID.from_string(room_id), servers))
@defer.inlineCallbacks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment