MCPcopy
hub / github.com/Zephyruso/zashboard / close

Function close

src/assembly/connections/singbox.ts:39–43  ·  view source on GitHub ↗
(id: string, base?: PbConnection | Connection)

Source from the content-addressed store, hash-verified

37 // 把一个连接归入「本拍新关闭」并从活跃表移除。NEW/UPDATE/CLOSED 任意事件携带的连接,只要
38 // closedAt > 0(初始快照里夹带的历史已关闭连接、或最终关闭快照)都走这里,避免遗留在活跃表。
39 const close = (id: string, base?: PbConnection | Connection) => {
40 const c = base ?? conns.get(id)
41 conns.delete(id)
42 if (c) newlyClosed.push(enrich(c, 0, 0))
43 }
44
45 const emit = () => {
46 timer = null

Callers 1

fetchSingboxConnectionsFunction · 0.70

Calls 1

enrichFunction · 0.85

Tested by

no test coverage detected