cmd/mi: fix reddit errors

This commit is contained in:
Cadey Ratio 2020-01-12 04:19:15 +00:00
parent 7a928aaa4a
commit 27a8595cbc
1 changed files with 4 additions and 2 deletions

View File

@ -71,8 +71,10 @@ func (mi *Mi) StreamReddit(ctx context.Context) {
kill <- true kill <- true
kill <- true kill <- true
runtime.Goexit() runtime.Goexit()
case <-errs: case err := <-errs:
if err != nil {
ln.Error(ctx, err) ln.Error(ctx, err)
}
case p := <-posts: case p := <-posts:
ln.Log(ctx, ln.Info("got reddit post"), ln.F{ ln.Log(ctx, ln.Info("got reddit post"), ln.F{
"from": p.Author, "from": p.Author,