From fdc452f77a473760c33af02c8b1e3acea9bbd85a Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Thu, 2 Apr 2026 04:20:17 +0300 Subject: [PATCH] [firehose] throttle on empty frame as well --- src/ingest/firehose.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ingest/firehose.rs b/src/ingest/firehose.rs index ce13691..70bd6ea 100644 --- a/src/ingest/firehose.rs +++ b/src/ingest/firehose.rs @@ -135,9 +135,9 @@ impl FirehoseIngestor { // continue; // } // } - let timeout = if let FirehoseError::WebSocket(e) = &e - && is_throttle_worthy(e) - { + let do_throttle = matches!(&e, FirehoseError::WebSocket(e) if is_throttle_worthy(e)) + || matches!(&e, FirehoseError::EmptyFrame); + let timeout = if do_throttle { self.throttle.record_failure(); let until = self.throttle.throttled_until(); Duration::from_secs((until - chrono::Utc::now().timestamp()) as u64) -- 2.51.2