(id: string, base?: PbConnection | Connection)
| 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 |
no test coverage detected