diff --git a/src/github.com/matrix-org/dendrite/syncapi/sync/userstream.go b/src/github.com/matrix-org/dendrite/syncapi/sync/userstream.go index eabe442b0..77d09c202 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/sync/userstream.go +++ b/src/github.com/matrix-org/dendrite/syncapi/sync/userstream.go @@ -129,7 +129,9 @@ func (s *UserStreamListener) GetStreamPosition() types.StreamPosition { // GetNotifyChannel returns a channel that is closed when there may be an // update for the user. -// sincePos specifies from which point we want to be notified about +// sincePos specifies from which point we want to be notified about. If there +// has already been an update after sincePos we'll return a closed channel +// immediately. func (s *UserStreamListener) GetNotifyChannel(sincePos types.StreamPosition) <-chan struct{} { s.userStream.lock.Lock() defer s.userStream.lock.Unlock()