add spantrace to use-after-exit of RpcContext

This commit is contained in:
Aiden McClelland
2021-12-04 19:51:30 -07:00
committed by Aiden McClelland
parent e6d1e49984
commit e968a1cca7

View File

@@ -336,7 +336,10 @@ impl Deref for RpcContext {
type Target = RpcContextSeed;
fn deref(&self) -> &Self::Target {
if self.0.is_closed.load(Ordering::SeqCst) {
panic!("RpcContext used after shutdown!");
panic!(
"RpcContext used after shutdown! {:?}",
tracing_error::SpanTrace::capture()
);
}
&*self.0
}