h3: only send GREASE frames once per connection
diff --git a/src/h3/mod.rs b/src/h3/mod.rs
index 329a86e..975d36b 100644
--- a/src/h3/mod.rs
+++ b/src/h3/mod.rs
@@ -523,6 +523,8 @@
max_push_id: u64,
finished_streams: VecDeque<u64>,
+
+ frames_greased: bool,
}
impl Connection {
@@ -570,6 +572,8 @@
max_push_id: 0,
finished_streams: VecDeque::new(),
+
+ frames_greased: false,
})
}
@@ -651,8 +655,9 @@
let header_block = self.encode_header_block(headers)?;
- if conn.grease {
+ if !self.frames_greased && conn.grease {
self.send_grease_frames(conn, stream_id)?;
+ self.frames_greased = true;
}
trace!(