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

Method shutdown

crates/opencode-plugin/src/subprocess/client.rs:407–414  ·  view source on GitHub ↗

Gracefully shut down the plugin subprocess.

(&self)

Source from the content-addressed store, hash-verified

405
406 /// Gracefully shut down the plugin subprocess.
407 pub async fn shutdown(&self) -> Result<(), PluginSubprocessError> {
408 let _: Value = self.call("shutdown", None).await?;
409 // Give the process a moment to exit, then kill if needed
410 let mut proc = self.process.lock().await;
411 let _ = tokio::time::timeout(Duration::from_secs(2), proc.wait()).await;
412 let _ = proc.kill().await;
413 Ok(())
414 }
415
416 // -- Transport (Content-Length framing) ----------------------------------
417

Callers 1

shutdown_allMethod · 0.80

Calls 1

callMethod · 0.80

Tested by

no test coverage detected