(ctx context.Context)
| 299 | } |
| 300 | |
| 301 | func (s *sourceManager) stop(ctx context.Context) { |
| 302 | if u := s.currentUploader(); u != nil { |
| 303 | userLog(ctx).Infow("canceling current upload", "src", s.src) |
| 304 | u.Cancel() |
| 305 | } |
| 306 | |
| 307 | close(s.closed) |
| 308 | } |
| 309 | |
| 310 | func (s *sourceManager) waitUntilStopped() { |
| 311 | s.wg.Wait() |