Skip to content

Commit

Permalink
Merge pull request #87 from hieblmi/fix-send-on-closed-channel
Browse files Browse the repository at this point in the history
Fix prematurely closing events channel
  • Loading branch information
edouardparis authored Oct 5, 2022
2 parents afe7699 + 0fa439e commit dcefd63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func run(c *cli.Context) error {
}()

ps.Run(ctx, events)
close(events)

return nil
}

Expand Down
1 change: 0 additions & 1 deletion ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func Run(ctx context.Context, app *app.App, sub chan *events.Event) error {
go ctrl.Listen(ctx, g, sub)

err = g.MainLoop()
close(sub)

return errors.WithStack(err)
}

0 comments on commit dcefd63

Please sign in to comment.