mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-13 01:43: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()
|
defer s.lock.Unlock()
|
||||||
|
|
||||||
if sincePos < s.pos {
|
if sincePos < s.pos {
|
||||||
posChannel := make(chan struct{})
|
// If the listener is behind, i.e. missed a potential update, then we
|
||||||
close(posChannel)
|
// want them to wake up immediately. We do this by returning a new
|
||||||
return posChannel
|
// closed stream, which returns immediately when selected.
|
||||||
|
closedChannel := make(chan struct{})
|
||||||
|
close(closedChannel)
|
||||||
|
return closedChannel
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.signalChannel
|
return s.signalChannel
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue