MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / release_proxy

Method release_proxy

src/docker/proxy_manager.rs:487–496  ·  view source on GitHub ↗

Atomically releases a proxy session for a task. Under a per-fingerprint lock, this method: 1. Cleans up the agent network (disconnect + remove) 2. Stops the proxy if no other agents are connected

(&self, session: &ProxySession)

Source from the content-addressed store, hash-verified

485 /// 1. Cleans up the agent network (disconnect + remove)
486 /// 2. Stops the proxy if no other agents are connected
487 pub async fn release_proxy(&self, session: &ProxySession) {
488 self.sync_manager
489 .with_lock(&session.fingerprint, || async {
490 self.cleanup_agent_network(&session.proxy_container_name, &session.network_name)
491 .await;
492 self.maybe_stop_proxy_by_name(&session.proxy_container_name)
493 .await;
494 })
495 .await;
496 }
497
498 /// Stops the proxy if no agents are connected, without acquiring the lock.
499 ///

Calls 3

with_lockMethod · 0.80
cleanup_agent_networkMethod · 0.80