Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Vine/Client/
IsClientConnected.rs

1//! Whether the named sidecar currently has a live entry in the
2//! connection pool. Cheap read of the shared map; no RPC issued. Useful
3//! for boot-race callers that need to know whether `SendRequest` would
4//! short-circuit *before* paying the serialization + lock-acquire cost.
5
6use crate::Vine::Client::{IsShuttingDown, Shared::SIDECAR_CLIENTS};
7
8pub fn Fn(SideCarIdentifier:&str) -> bool {
9	if IsShuttingDown::Fn() {
10		return false;
11	}
12
13	let Pool = SIDECAR_CLIENTS.lock();
14
15	Pool.contains_key(SideCarIdentifier)
16}