mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Lots of small typo fixes (#737)
This commit is contained in:
parent
29841bed6b
commit
e2251199a4
9 changed files with 16 additions and 16 deletions
11
typingserver/cache/cache.go
vendored
11
typingserver/cache/cache.go
vendored
|
@ -127,11 +127,12 @@ func (t *TypingCache) addUser(
|
|||
|
||||
// Stop the timer to cancel the call to timeoutCallback
|
||||
if timer, ok := t.data[roomID].userSet[userID]; ok {
|
||||
// It may happen that at this stage timer fires but now we have a lock on t.
|
||||
// Hence the execution of timeoutCallback will happen after we unlock.
|
||||
// So we may lose a typing state, though this event is highly unlikely.
|
||||
// This can be mitigated by keeping another time.Time in the map and check against it
|
||||
// before removing. This however is not required in most practical scenario.
|
||||
// It may happen that at this stage the timer fires, but we now have a lock on
|
||||
// it. Hence the execution of timeoutCallback will happen after we unlock. So
|
||||
// we may lose a typing state, though this is highly unlikely. This can be
|
||||
// mitigated by keeping another time.Time in the map and checking against it
|
||||
// before removing, but its occurrence is so infrequent it does not seem
|
||||
// worthwhile.
|
||||
timer.Stop()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue