Add comments around asynchronous sends to roomserver in processEventWithMissingState

This commit is contained in:
Neil Alexander 2022-01-05 15:16:59 +00:00
parent 1099a1cc0c
commit 91e7a82e61
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -884,6 +884,8 @@ 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 {
@ -905,6 +907,8 @@ 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)