From 44c354e48a84a096ab00eb751ec7ebb54af2a6a8 Mon Sep 17 00:00:00 2001 From: dawn <90008@klbr.net> Date: Mon, 22 Jun 2026 04:18:00 +0300 Subject: [PATCH] [ingest] document intentional 1001 close backoff bypass --- src/ingest/firehose.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ingest/firehose.rs b/src/ingest/firehose.rs index 45e967b..f332eaa 100644 --- a/src/ingest/firehose.rs +++ b/src/ingest/firehose.rs @@ -376,6 +376,10 @@ impl FirehoseIngestor { match res { Ok(()) => {} + // 1001 "going away" means the server shut down cleanly (restart, deploy, etc.). + // this is not a real failure so we intentionally skip on_failure / backoff and + // reconnect quickly. a malicious source could abuse this but they could equally + // just drop the TCP connection, which would hit the normal backoff path anyway. Err(FirehoseError::StreamClosed { code: 1001, reason }) => { #[cfg(feature = "firehose-diagnostics")] self.stats.record_stream_error("stream_closed"); -- 2.51.2