From c460c6e5811e019fb0410bd5ec8ec9cc10b7ad09 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 6 May 2020 12:37:58 -0700 Subject: [PATCH] Change store debug_assert to only run in tests --- src/proto/streams/store.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/proto/streams/store.rs b/src/proto/streams/store.rs index ebb1cd7..09d8a64 100644 --- a/src/proto/streams/store.rs +++ b/src/proto/streams/store.rs @@ -204,6 +204,12 @@ impl Store { } } +// While running h2 unit/integration tests, enable this debug assertion. +// +// In practice, we don't need to ensure this. But the integration tests +// help to make sure we've cleaned up in cases where we could (like, the +// runtime isn't suddenly dropping the task for unknown reasons). +#[cfg(feature = "unstable")] impl Drop for Store { fn drop(&mut self) { use std::thread;