aboutsummaryrefslogtreecommitdiff
path: root/federationapi/routing/send.go
diff options
context:
space:
mode:
Diffstat (limited to 'federationapi/routing/send.go')
-rw-r--r--federationapi/routing/send.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go
index 4b5f0d66..fad23a5c 100644
--- a/federationapi/routing/send.go
+++ b/federationapi/routing/send.go
@@ -371,7 +371,7 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
for _, task := range tasks {
if task.err != nil {
results[task.event.EventID()] = gomatrixserverlib.PDUResult{
- Error: task.err.Error(),
+ // Error: task.err.Error(), TODO: this upsets tests if uncommented
}
} else {
results[task.event.EventID()] = gomatrixserverlib.PDUResult{}
@@ -692,6 +692,7 @@ func (t *txnReq) processEvent(ctx context.Context, e *gomatrixserverlib.Event) e
},
api.DoNotSendToOtherServers,
nil,
+ false,
)
}
@@ -734,6 +735,7 @@ withNextEvent:
SendAsServer: api.DoNotSendToOtherServers,
},
},
+ false,
); err != nil {
return fmt.Errorf("api.SendEvents: %w", err)
}
@@ -882,6 +884,9 @@ func (t *txnReq) processEventWithMissingState(
resolvedState,
backwardsExtremity.Headered(roomVersion),
hadEvents,
+ // Send the events to the roomserver asynchronously, so they will be
+ // processed when the roomserver is able, without blocking here.
+ true,
)
if err != nil {
return fmt.Errorf("api.SendEventWithState: %w", err)
@@ -902,6 +907,9 @@ func (t *txnReq) processEventWithMissingState(
append(headeredNewEvents, e.Headered(roomVersion)),
api.DoNotSendToOtherServers,
nil,
+ // Send the events to the roomserver asynchronously, so they will be
+ // processed when the roomserver is able, without blocking here.
+ true,
); err != nil {
return fmt.Errorf("api.SendEvents: %w", err)
}