From a07572822a10edc3ce8c4a6e775f496964833d36 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 25 Nov 2023 17:08:28 +0000 Subject: [PATCH] fixed processing none security subscription --- app/subscription/specs/outbound_parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/subscription/specs/outbound_parser.go b/app/subscription/specs/outbound_parser.go index b309efd11..272117578 100644 --- a/app/subscription/specs/outbound_parser.go +++ b/app/subscription/specs/outbound_parser.go @@ -55,7 +55,7 @@ func (p *OutboundParser) toAbstractServerSpec(config *OutboundConfig) (*ServerCo } serverConfig.TransportSettings = serial.ToTypedMessage(transportSettings) } - { + if config.StreamSetting.Security != "none" { securitySettings, err := loadHeterogeneousConfigFromRawJSONRestricted( "security", config.StreamSetting.Security, config.StreamSetting.SecuritySettings) if err != nil { @@ -72,7 +72,7 @@ func (p *OutboundParser) toAbstractServerSpec(config *OutboundConfig) (*ServerCo func (p *OutboundParser) ToSubscriptionServerConfig(config *OutboundConfig) (*SubscriptionServerConfig, error) { serverSpec, err := p.toAbstractServerSpec(config) if err != nil { - return nil, newError("unable to parse server specification") + return nil, newError("unable to parse server specification").Base(err) } return &SubscriptionServerConfig{ Configuration: serverSpec,