Use latest sync position

This commit is contained in:
Neil Alexander 2020-05-29 12:04:32 +01:00
parent cc456240fa
commit 7a073b14fc

View file

@ -115,9 +115,8 @@ func (t *EDUCache) AddTypingUser(
func (t *EDUCache) AddSendToDeviceMessage() int64 { func (t *EDUCache) AddSendToDeviceMessage() int64 {
t.Lock() t.Lock()
defer t.Unlock() defer t.Unlock()
r := t.latestSyncPosition
t.latestSyncPosition++ t.latestSyncPosition++
return r return t.latestSyncPosition
} }
// addUser with mutex lock & replace the previous timer. // addUser with mutex lock & replace the previous timer.