Skip to content

Commit df628a4

Browse files
lwshangclaude
andcommitted
fix: simplify stale descriptor cleanup and fix ordering
Clean port descriptor before project descriptor so the global resource is freed first. Pass gateway_port() directly since cleanup_port_descriptor already handles None. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3e255f4 commit df628a4

File tree

1 file changed

+2
-3
lines changed
  • crates/icp-cli/src/commands/network

1 file changed

+2
-3
lines changed

crates/icp-cli/src/commands/network/start.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,9 @@ pub(crate) async fn exec(ctx: &Context, args: &StartArgs) -> Result<(), anyhow::
9191
Cleaning up and starting fresh.",
9292
network.name
9393
);
94+
nd.cleanup_port_descriptor(descriptor.gateway_port())
95+
.await?;
9496
nd.cleanup_project_network_descriptor().await?;
95-
if let Some(port) = descriptor.gateway_port() {
96-
nd.cleanup_port_descriptor(Some(port)).await?;
97-
}
9897
}
9998
}
10099

0 commit comments

Comments
 (0)