From 199987445d875556feaf6985031814f7a5ed4dea Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 9 Apr 2024 14:02:30 +0300 Subject: [PATCH] Reduce number of CONNECTION_CLOSE frames If this makes ngtcp2 happy, refactor into separate PR. --- neqo-bin/src/client/http09.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neqo-bin/src/client/http09.rs b/neqo-bin/src/client/http09.rs index e0b254f67b..568766ea12 100644 --- a/neqo-bin/src/client/http09.rs +++ b/neqo-bin/src/client/http09.rs @@ -153,7 +153,9 @@ impl super::Client for Connection { where S: AsRef + std::fmt::Display, { - self.close(now, app_error, msg); + if !self.state().closed() { + self.close(now, app_error, msg); + } } fn is_closed(&self) -> Option {