mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 06:58:27 +00:00
10 seconds to deal with an event
This commit is contained in:
parent
8fd878c75a
commit
73c9c7d798
1 changed files with 3 additions and 0 deletions
|
@ -498,6 +498,9 @@ func (t *txnReq) getServers(ctx context.Context, roomID string) []gomatrixserver
|
|||
}
|
||||
|
||||
func (t *txnReq) processEvent(ctx context.Context, e *gomatrixserverlib.Event) error {
|
||||
var cancel context.CancelFunc
|
||||
ctx, cancel = context.WithTimeout(ctx, time.Second*10)
|
||||
defer cancel()
|
||||
logger := util.GetLogger(ctx).WithField("event_id", e.EventID()).WithField("room_id", e.RoomID())
|
||||
t.work = "" // reset from previous event
|
||||
|
||||
|
|
Loading…
Reference in a new issue