Add metric for users locked in post-login sync

This commit is contained in:
Tulir Asokan
2020-11-06 02:38:31 +02:00
parent bf5be3fe62
commit 221326bcbf
2 changed files with 28 additions and 4 deletions

View File

@@ -798,7 +798,9 @@ func (user *User) handleMessageLoop() {
user.GetPortalByJID(msg.chat).messages <- msg
case <-user.syncStart:
user.log.Debugln("Processing of incoming messages is locked")
user.bridge.Metrics.TrackSyncLock(user.JID, true)
user.syncWait.Wait()
user.bridge.Metrics.TrackSyncLock(user.JID, false)
user.log.Debugln("Processing of incoming messages unlocked")
}
}