Fix telemetry panic error in node-template (#1958)

This commit is contained in:
郭光华
2019-03-12 20:19:42 +08:00
committed by Bastian Köcher
parent ead437d0f4
commit 3149136367
5 changed files with 13 additions and 11 deletions
+5
View File
@@ -66,6 +66,11 @@ fn run_until_exit<T, C, E>(
let _ = runtime.block_on(e.into_exit());
exit_send.fire();
// we eagerly drop the service so that the internal exit future is fired,
// but we need to keep holding a reference to the global telemetry guard
let _telemetry = service.telemetry();
drop(service);
Ok(())
}