aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.bleep2
-rw-r--r--Cargo.toml2
-rw-r--r--pingora-core/src/connectors/http/v2.rs5
3 files changed, 6 insertions, 3 deletions
diff --git a/.bleep b/.bleep
index c142fa0..045b30f 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-4b2957a626c93fec5e24438cbbc0b506bbca25a6 \ No newline at end of file
+ba954539761beee5e5d09b66c3a2957212aa499f
diff --git a/Cargo.toml b/Cargo.toml
index f50a2f5..1ec85f8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ httparse = "1"
bytes = "1.0"
http = "1.0.0"
log = "0.4"
-h2 = ">=0.4.4"
+h2 = ">=0.4.6"
once_cell = "1"
lru = "0"
ahash = ">=0.8.9"
diff --git a/pingora-core/src/connectors/http/v2.rs b/pingora-core/src/connectors/http/v2.rs
index a1f295a..ad41f6b 100644
--- a/pingora-core/src/connectors/http/v2.rs
+++ b/pingora-core/src/connectors/http/v2.rs
@@ -85,9 +85,12 @@ impl ConnectionRef {
release_lock: Arc::new(Mutex::new(())),
}))
}
+
pub fn more_streams_allowed(&self) -> bool {
+ let current = self.0.current_streams.load(Ordering::Relaxed);
!self.is_shutting_down()
- && self.0.max_streams > self.0.current_streams.load(Ordering::Relaxed)
+ && self.0.max_streams > current
+ && self.0.connection_stub.0.current_max_send_streams() > current
}
pub fn is_idle(&self) -> bool {