From ce9bbdadb1daa3f0ca07253edd095b55ade7245e Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Tue, 13 Oct 2026 19:47:47 -0700 Subject: [PATCH] Refuse --peers together with --disable-syndication A pushing node announces its streams to its peers, but with syndication disabled it refuses every subscription to them, so each peer drops the session and redials forever (subscription reset, code 0x33). Fail at startup instead. --- pkg/config/config.go | 5 +++++ pkg/config/config_check_test.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 513b0ae00..059e59497 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1520,6 +1520,11 @@ func (cli *CLI) CheckConfig() error { errs = append(errs, fmt.Errorf("--signing-key: %w", err)) } } + if cli.DisableSyndication && len(cli.Peers) > 0 { + // A node pushing to peers announces its streams, then refuses every + // subscription to them with syndication off: the peers retry forever. + errs = append(errs, fmt.Errorf("--peers pushes this node's streams, which --disable-syndication refuses to serve; drop one of them")) + } if err := cli.validateVODCDN(); err != nil { errs = append(errs, err) } diff --git a/pkg/config/config_check_test.go b/pkg/config/config_check_test.go index 0534ffc52..bcfa1f1c3 100644 --- a/pkg/config/config_check_test.go +++ b/pkg/config/config_check_test.go @@ -59,6 +59,10 @@ func TestCheckConfig(t *testing.T) { bad(CLI{TranscodeRenditions: "not-a-rendition", FirebaseServiceAccountFile: filepath.Join(t.TempDir(), "nope.json")}, "--transcode-renditions", "--firebase-service-account-file") + // Pushing to peers needs syndication: a pushing node refuses the peers' + // subscriptions without it. + bad(CLI{DataDir: t.TempDir(), DisableSyndication: true, Peers: []string{"https://peer.example"}}, + "--peers", "--disable-syndication") // Multiple problems are reported together, not one at a time. multi := CLI{LivepeerGateway: true, LivepeerGatewayURL: "http://127.0.0.1:8935", -- 2.51.2