refactor(http2): store bdp sampler in Body H2 variant

This commit is contained in:
Sean McArthur
2020-03-03 14:23:49 -08:00
parent a82fd6c94a
commit 6a1bd055fc
3 changed files with 7 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ type WindowSize = u32;
/// Any higher than this likely will be hitting the TCP flow control.
const BDP_LIMIT: usize = 1024 * 1024 * 16;
pub(crate) fn disabled() -> Sampler {
pub(super) fn disabled() -> Sampler {
Sampler {
shared: Weak::new(),
}
@@ -105,10 +105,6 @@ impl Sampler {
inner.bytes += bytes;
}
pub(crate) fn is_enabled(&self) -> bool {
self.shared.strong_count() > 0
}
}
impl Estimator {