From 91e7a82e61fd12a38063ca8082cfd72b87ac5f7b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 5 Jan 2022 15:16:59 +0000 Subject: [PATCH] Add comments around asynchronous sends to roomserver in processEventWithMissingState --- federationapi/routing/send.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 80e65da9..fad23a5c 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -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)