CloseBroadcasts drops the wildcard subscriptions. Safe to call multiple times.
()
| 621 | |
| 622 | // CloseBroadcasts drops the wildcard subscriptions. Safe to call multiple times. |
| 623 | func (g *GalleryService) CloseBroadcasts() { |
| 624 | g.Lock() |
| 625 | subs := g.broadcastSubs |
| 626 | g.broadcastSubs = nil |
| 627 | g.Unlock() |
| 628 | for _, s := range subs { |
| 629 | if err := s.Unsubscribe(); err != nil { |
| 630 | xlog.Warn("GalleryService unsubscribe failed", "error", err) |
| 631 | } |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | // Hydrate loads still-active operations from the GalleryStore into the |
| 636 | // in-memory statuses map so a freshly-started replica does not return an |
no test coverage detected