modified internal/server/feeds_handler.go +2 -2
| @@ -186,7 +186,7 @@ func (s *Server) handleAddFeed(w http.ResponseWriter, r *http.Request) { |
| 186 | 186 | return |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | | - go s.storeFetchResult(context.Background(), feedURL, result.Feed.SiteURL, result) |
| 189 | + go s.storeFetchResult(context.WithoutCancel(r.Context()), feedURL, result.Feed.SiteURL, result) |
| 190 | 190 | |
| 191 | 191 | if err := s.engine.MarkImpressionActed(r.Context(), user.DID, "feed", feedURL); err != nil { |
| 192 | 192 | s.logger.Warn("failed to mark impression acted", "error", err) |
| @@ -335,7 +335,7 @@ func (s *Server) handleOPMLUpload(w http.ResponseWriter, r *http.Request) { |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | go func() { |
| 338 | | - g, ctx := errgroup.WithContext(context.Background()) |
| 338 | + g, ctx := errgroup.WithContext(context.WithoutCancel(r.Context())) |
| 339 | 339 | g.SetLimit(5) |
| 340 | 340 | for _, f := range feedsToFetch { |
| 341 | 341 | g.Go(func() error { |
| @@ -186,7 +186,7 @@ func (s *Server) handleAddFeed(w http.ResponseWriter, r *http.Request) { |
| 186 | return | 186 | return |
| 187 | } | 187 | } |
| 188 | | 188 | |
| 189 | - go s.storeFetchResult(context.Background(), feedURL, result.Feed.SiteURL, result) | 189 | + go s.storeFetchResult(context.WithoutCancel(r.Context()), feedURL, result.Feed.SiteURL, result) |
| 190 | | 190 | |
| 191 | if err := s.engine.MarkImpressionActed(r.Context(), user.DID, "feed", feedURL); err != nil { | 191 | if err := s.engine.MarkImpressionActed(r.Context(), user.DID, "feed", feedURL); err != nil { |
| 192 | s.logger.Warn("failed to mark impression acted", "error", err) | 192 | s.logger.Warn("failed to mark impression acted", "error", err) |
| @@ -335,7 +335,7 @@ func (s *Server) handleOPMLUpload(w http.ResponseWriter, r *http.Request) { |
| 335 | } | 335 | } |
| 336 | | 336 | |
| 337 | go func() { | 337 | go func() { |
| 338 | - g, ctx := errgroup.WithContext(context.Background()) | 338 | + g, ctx := errgroup.WithContext(context.WithoutCancel(r.Context())) |
| 339 | g.SetLimit(5) | 339 | g.SetLimit(5) |
| 340 | for _, f := range feedsToFetch { | 340 | for _, f := range feedsToFetch { |
| 341 | g.Go(func() error { | 341 | g.Go(func() error { |