From db4527544dac082ef855ba149085d4d7dd483b0c Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 18 Apr 2024 14:06:11 +0200 Subject: [PATCH] No need to pass remote url when deleting (remote) subscriber. --- api_proxy.go | 9 +++------ mcu_proxy.go | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/api_proxy.go b/api_proxy.go index ad68c19..c809e31 100644 --- a/api_proxy.go +++ b/api_proxy.go @@ -228,12 +228,9 @@ func (m *CommandProxyClientMessage) CheckValid() error { return fmt.Errorf("stream type missing") } if m.RemoteUrl != "" { - // TODO: Enable once subscriber deletion provides this value. - /* - if m.RemoteToken == "" { - return fmt.Errorf("remote token type missing") - } - */ + if m.RemoteToken == "" { + return fmt.Errorf("remote token type missing") + } remoteUrl, err := url.Parse(m.RemoteUrl) if err != nil { diff --git a/mcu_proxy.go b/mcu_proxy.go index 4ee3447..4b5ba8b 100644 --- a/mcu_proxy.go +++ b/mcu_proxy.go @@ -263,10 +263,6 @@ func (s *mcuProxySubscriber) Close(ctx context.Context) { ClientId: s.proxyId, }, } - if s.publisherConn != nil { - msg.Command.RemoteUrl = s.publisherConn.rawUrl - // TODO: Add remote token for this subscriber. - } if response, err := s.conn.performSyncRequest(ctx, msg); err != nil { if s.publisherConn != nil {