mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Fix closing feed updates channel too early
This commit is contained in:
@ -155,6 +155,10 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// Queue of feeds to update
|
||||
updates := make(chan *feed.Config, 16)
|
||||
defer close(updates)
|
||||
|
||||
group, ctx := errgroup.WithContext(ctx)
|
||||
defer func() {
|
||||
if err := group.Wait(); err != nil && (err != context.Canceled && err != http.ErrServerClosed) {
|
||||
@ -163,10 +167,6 @@ func main() {
|
||||
log.Info("gracefully stopped")
|
||||
}()
|
||||
|
||||
// Queue of feeds to update
|
||||
updates := make(chan *feed.Config, 16)
|
||||
defer close(updates)
|
||||
|
||||
// Create Cron
|
||||
c := cron.New(cron.WithChain(cron.SkipIfStillRunning(cron.DiscardLogger)))
|
||||
m := make(map[string]cron.EntryID)
|
||||
|
Reference in New Issue
Block a user