MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / wsOnDisconnected

Method wsOnDisconnected

sdk/cliproxy/service.go:652–670  ·  view source on GitHub ↗
(channelID string, reason error)

Source from the content-addressed store, hash-verified

650}
651
652func (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
672func (s *Service) applyCoreAuthAddOrUpdate(ctx context.Context, auth *coreauth.Auth) {
673 auth = s.prepareCoreAuthForModelRegistration(ctx, auth)

Callers

nothing calls this directly

Calls 2

emitAuthUpdateMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected