MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / connection_end

Method connection_end

nodedb/src/control/security/tenant.rs:242–246  ·  view source on GitHub ↗

Record a connection close.

(&mut self, tenant_id: TenantId)

Source from the content-addressed store, hash-verified

240
241 /// Record a connection close.
242 pub fn connection_end(&mut self, tenant_id: TenantId) {
243 if let Some(usage) = self.usage.get_mut(&tenant_id) {
244 usage.active_connections = usage.active_connections.saturating_sub(1);
245 }
246 }
247
248 /// Get usage stats for a tenant.
249 pub fn usage(&self, tenant_id: TenantId) -> Option<&TenantUsage> {

Callers 2

tenant_connection_endMethod · 0.80
connection_enforcementFunction · 0.80

Calls 1

get_mutMethod · 0.45

Tested by 1

connection_enforcementFunction · 0.64