mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Use only origin server to speed things up
This commit is contained in:
parent
57be026e81
commit
f54063a61a
1 changed files with 11 additions and 9 deletions
|
@ -466,21 +466,23 @@ func (t *txnReq) processDeviceListUpdate(ctx context.Context, e gomatrixserverli
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *txnReq) getServers(ctx context.Context, roomID string) []gomatrixserverlib.ServerName {
|
func (t *txnReq) getServers(_ context.Context, _ string) []gomatrixserverlib.ServerName {
|
||||||
t.serversMutex.Lock()
|
t.serversMutex.Lock()
|
||||||
defer t.serversMutex.Unlock()
|
defer t.serversMutex.Unlock()
|
||||||
if t.servers != nil {
|
if t.servers != nil {
|
||||||
return t.servers
|
return t.servers
|
||||||
}
|
}
|
||||||
t.servers = []gomatrixserverlib.ServerName{t.Origin}
|
t.servers = []gomatrixserverlib.ServerName{t.Origin}
|
||||||
serverReq := &api.QueryServerJoinedToRoomRequest{
|
/*
|
||||||
RoomID: roomID,
|
serverReq := &api.QueryServerJoinedToRoomRequest{
|
||||||
}
|
RoomID: roomID,
|
||||||
serverRes := &api.QueryServerJoinedToRoomResponse{}
|
}
|
||||||
if err := t.rsAPI.QueryServerJoinedToRoom(ctx, serverReq, serverRes); err == nil {
|
serverRes := &api.QueryServerJoinedToRoomResponse{}
|
||||||
t.servers = append(t.servers, serverRes.ServerNames...)
|
if err := t.rsAPI.QueryServerJoinedToRoom(ctx, serverReq, serverRes); err == nil {
|
||||||
util.GetLogger(ctx).Infof("Found %d server(s) to query for missing events in %q", len(t.servers), roomID)
|
t.servers = append(t.servers, serverRes.ServerNames...)
|
||||||
}
|
util.GetLogger(ctx).Infof("Found %d server(s) to query for missing events in %q", len(t.servers), roomID)
|
||||||
|
}
|
||||||
|
*/
|
||||||
return t.servers
|
return t.servers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue