summaryrefslogtreecommitdiff
path: root/cli/inspector.rs
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-09-28 18:22:29 +0800
committerGitHub <noreply@github.com>2020-09-28 12:22:29 +0200
commit6587d1bce80fe6beef7353efcf00a674438e6e4e (patch)
tree81fb39591a8593b06cd91c18d31f6409ffcb5868 /cli/inspector.rs
parent45d4fd44c9444241a898d3075b99e8871fccdd65 (diff)
fix(cli/test): do not start inspector server when collecting coverage (#7718)
Diffstat (limited to 'cli/inspector.rs')
-rw-r--r--cli/inspector.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/inspector.rs b/cli/inspector.rs
index d0601c522..f68882e48 100644
--- a/cli/inspector.rs
+++ b/cli/inspector.rs
@@ -452,6 +452,11 @@ impl DenoInspector {
&self,
mut invoker_cx: Option<&mut Context>,
) -> Result<Poll<()>, BorrowMutError> {
+ // Short-circuit if there is no server
+ if self.server.is_none() {
+ return Ok(Poll::Ready(()));
+ }
+
// The futures this function uses do not have re-entrant poll() functions.
// However it is can happpen that poll_sessions() gets re-entered, e.g.
// when an interrupt request is honored while the inspector future is polled