mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Don't leak channels
This commit is contained in:
parent
cbaeff6096
commit
6da5ebfadf
|
|
@ -75,6 +75,7 @@ func (p *StreamProvider) NotifyAfter(
|
|||
case <-ctx.Done():
|
||||
// The context has expired, so there's no point
|
||||
// in continuing to wait for the update.
|
||||
close(ch)
|
||||
return
|
||||
default:
|
||||
// The latest position has been advanced. Let's
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func (p *StreamLogProvider) NotifyAfter(
|
|||
case <-ctx.Done():
|
||||
// The context has expired, so there's no point
|
||||
// in continuing to wait for the update.
|
||||
close(ch)
|
||||
return
|
||||
default:
|
||||
// The latest position has been advanced. Let's
|
||||
|
|
|
|||
Loading…
Reference in a new issue