Skip to content

Commit

Permalink
Extend context timeout on send_join to allow for joining complex rooms (
Browse files Browse the repository at this point in the history
#3153)

Background federated joins are currently broken since they timeout after
30s. This timeout didn't exist before the refactor. It should still exist but it needs to be extended to allow for the additional time it can take a server to generate the /send_join response when joining a complex room.
  • Loading branch information
devonh committed Jul 18, 2023
1 parent 33ff309 commit a01faee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion federationapi/internal/federationclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (a *FederationInternalAPI) MakeJoin(
func (a *FederationInternalAPI) SendJoin(
ctx context.Context, origin, s spec.ServerName, event gomatrixserverlib.PDU,
) (res gomatrixserverlib.SendJoinResponse, err error) {
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
ctx, cancel := context.WithTimeout(ctx, time.Minute*5)
defer cancel()
ires, err := a.federation.SendJoin(ctx, origin, s, event)
if err != nil {
Expand Down

0 comments on commit a01faee

Please sign in to comment.