mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Add comment and rename variable
This commit is contained in:
parent
6396edf1a4
commit
ce0ec60fe1
|
|
@ -135,9 +135,12 @@ func (s *UserStreamListener) GetNotifyChannel(sincePos types.StreamPosition) <-c
|
|||
defer s.lock.Unlock()
|
||||
|
||||
if sincePos < s.pos {
|
||||
posChannel := make(chan struct{})
|
||||
close(posChannel)
|
||||
return posChannel
|
||||
// If the listener is behind, i.e. missed a potential update, then we
|
||||
// want them to wake up immediately. We do this by returning a new
|
||||
// closed stream, which returns immediately when selected.
|
||||
closedChannel := make(chan struct{})
|
||||
close(closedChannel)
|
||||
return closedChannel
|
||||
}
|
||||
|
||||
return s.signalChannel
|
||||
|
|
|
|||
Loading…
Reference in a new issue