(socket: Socket)
| 18 | * Called from the http-proxy 'open' event in server.ts. |
| 19 | */ |
| 20 | export function trackProxySocket(socket: Socket): void { |
| 21 | proxySockets.add(socket); |
| 22 | socket.once('close', () => proxySockets.delete(socket)); |
| 23 | |
| 24 | // If we're already streaming, pause immediately |
| 25 | if (streaming) { |
| 26 | socket.pause(); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Called when an agent stream starts. |