MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / unregister

Method unregister

packages/server/src/inspector.rs:353–374  ·  view source on GitHub ↗
(&self, process_identifier: i64, connection_id: u64)

Source from the content-addressed store, hash-verified

351 }
352
353 async fn unregister(&self, process_identifier: i64, connection_id: u64) {
354 let mut inner = self.inner.lock().await;
355 let removed = if inner
356 .agents
357 .get(&process_identifier)
358 .map(|agent| agent.connection_id)
359 == Some(connection_id)
360 {
361 inner.agents.remove(&process_identifier);
362 true
363 } else {
364 false
365 };
366 drop(inner);
367 if removed {
368 if let Some(registry) = self.registry.as_ref() {
369 if let Err(error) = registry.remove(process_identifier).await {
370 debug!("Failed to remove SimDeck inspector registry entry: {error}");
371 }
372 }
373 }
374 }
375
376 async fn update_agent_info_from_response(&self, process_identifier: i64, response: &Value) {
377 let Some(info) = inspector_info_from_response(response) else {

Callers 1

handle_socketMethod · 0.80

Calls 2

getMethod · 0.65
removeMethod · 0.65

Tested by

no test coverage detected