forked from MirrorHub/mautrix-whatsapp
Lock latest event backfill lock when handling Matrix messages
This commit is contained in:
parent
65e0c0019e
commit
5e28343350
1 changed files with 2 additions and 0 deletions
|
@ -313,6 +313,8 @@ func (portal *Portal) handleMessageLoopItem(msg PortalMessage) {
|
|||
}
|
||||
|
||||
func (portal *Portal) handleMatrixMessageLoopItem(msg PortalMatrixMessage) {
|
||||
portal.latestEventBackfillLock.Lock()
|
||||
defer portal.latestEventBackfillLock.Unlock()
|
||||
evtTS := time.UnixMilli(msg.evt.Timestamp)
|
||||
timings := messageTimings{
|
||||
initReceive: msg.evt.Mautrix.ReceivedAt.Sub(evtTS),
|
||||
|
|
Loading…
Reference in a new issue