(channelID string, reason error)
| 650 | } |
| 651 | |
| 652 | func (s *Service) wsOnDisconnected(channelID string, reason error) { |
| 653 | if s == nil || channelID == "" { |
| 654 | return |
| 655 | } |
| 656 | if reason != nil { |
| 657 | if strings.Contains(reason.Error(), "replaced by new connection") { |
| 658 | log.Infof("websocket provider replaced: %s", channelID) |
| 659 | return |
| 660 | } |
| 661 | log.Warnf("websocket provider disconnected: %s (%v)", channelID, reason) |
| 662 | } else { |
| 663 | log.Infof("websocket provider disconnected: %s", channelID) |
| 664 | } |
| 665 | ctx := context.Background() |
| 666 | s.emitAuthUpdate(ctx, watcher.AuthUpdate{ |
| 667 | Action: watcher.AuthUpdateActionDelete, |
| 668 | ID: channelID, |
| 669 | }) |
| 670 | } |
| 671 | |
| 672 | func (s *Service) applyCoreAuthAddOrUpdate(ctx context.Context, auth *coreauth.Auth) { |
| 673 | auth = s.prepareCoreAuthForModelRegistration(ctx, auth) |
nothing calls this directly
no test coverage detected