()
| 43 | |
| 44 | /** Clean up the RPC client. */ |
| 45 | export function closeRpc(): void { |
| 46 | // Closing invalidates any already-issued RPC calls; their callbacks must |
| 47 | // observe the new generation and abandon (the WS socket checks it too). |
| 48 | rpcGeneration += 1; |
| 49 | rpcClient?.reset(); |
| 50 | rpcClient = null; |
| 51 | } |
| 52 | |
| 53 | const EMPTY_SNAPSHOT: SidebarSnapshot = { |
| 54 | sessionId: "", |