From 251952c14e1d10ea7d0fbbbc9f5edda8c1d7d08a Mon Sep 17 00:00:00 2001 From: austinabell Date: Tue, 10 May 2022 21:52:37 -0400 Subject: [PATCH] fix: error if sandbox process has already started --- workspaces/src/network/server.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workspaces/src/network/server.rs b/workspaces/src/network/server.rs index 272a6427..641fcb76 100644 --- a/workspaces/src/network/server.rs +++ b/workspaces/src/network/server.rs @@ -25,6 +25,10 @@ impl SandboxServer { } pub fn start(&mut self) -> anyhow::Result<()> { + if self.process.is_some() { + anyhow::bail!("Sandbox server already started"); + } + info!(target: "workspaces", "Starting up sandbox at localhost:{}", self.rpc_port); let home_dir = Sandbox::home_dir(self.rpc_port);