diff --git a/cli/cli.go b/cli/cli.go index 5f109f1..18b90e4 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -71,6 +71,8 @@ func run(c *cli.Context) error { }() ps.Run(ctx, events) + close(events) + return nil } diff --git a/ui/ui.go b/ui/ui.go index f7ee586..d1dd3b7 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -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) }