MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / close

Method close

crates/opencode-mcp/src/transport.rs:143–153  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

141 }
142
143 async fn close(&self) -> Result<(), McpClientError> {
144 let mut process_guard = self.process.lock().await;
145 if let Some(mut child) = process_guard.take() {
146 child.kill().await.map_err(|e| {
147 McpClientError::TransportError(format!("Failed to kill process: {}", e))
148 })?;
149 }
150 let mut stdin_guard = self.stdin.lock().await;
151 *stdin_guard = None;
152 Ok(())
153 }
154}
155
156// ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

abortMethod · 0.80

Tested by

no test coverage detected