Merge pull request #87 from hieblmi/fix-send-on-closed-channel

Fix prematurely closing events channel
pull/94/head
Édouard 2 years ago committed by GitHub
commit dcefd63a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,6 +71,8 @@ func run(c *cli.Context) error {
}()
ps.Run(ctx, events)
close(events)
return nil
}

@ -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)
}

Loading…
Cancel
Save