add unstable flag to rpc context panic

This commit is contained in:
Aiden McClelland
2021-12-28 13:00:17 -07:00
committed by Aiden McClelland
parent 36d5d40b4f
commit c8719061e4

View File

@@ -370,9 +370,10 @@ impl Context for RpcContext {
impl Deref for RpcContext {
type Target = RpcContextSeed;
fn deref(&self) -> &Self::Target {
#[cfg(feature = "unstable")]
if self.0.is_closed.load(Ordering::SeqCst) {
panic!(
"RpcContext used after shutdown! {:?}",
"RpcContext used after shutdown! {}",
tracing_error::SpanTrace::capture()
);
}