Skip to content

Commit 6e7c919

Browse files
committed
Only close done channel when notifier is present
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent cb0be34 commit 6e7c919

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/notifications/manager.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ func (m *Manager) Run(ctx context.Context) {
153153
// events, creating a notifier, and publishing bulk dispatch result updates to the store.
154154
func (m *Manager) loop(ctx context.Context) error {
155155
defer func() {
156-
close(m.done)
156+
if m.notifier != nil {
157+
close(m.done)
158+
}
157159
m.log.Info(context.Background(), "notification manager stopped")
158160
}()
159161

0 commit comments

Comments
 (0)