mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13: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():
|
case <-ctx.Done():
|
||||||
// The context has expired, so there's no point
|
// The context has expired, so there's no point
|
||||||
// in continuing to wait for the update.
|
// in continuing to wait for the update.
|
||||||
|
close(ch)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
// The latest position has been advanced. Let's
|
// The latest position has been advanced. Let's
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ func (p *StreamLogProvider) NotifyAfter(
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
// The context has expired, so there's no point
|
// The context has expired, so there's no point
|
||||||
// in continuing to wait for the update.
|
// in continuing to wait for the update.
|
||||||
|
close(ch)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
// The latest position has been advanced. Let's
|
// The latest position has been advanced. Let's
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue