(channelId: string, ws: WebSocket)
| 540 | } |
| 541 | |
| 542 | private removeSocket(channelId: string, ws: WebSocket): void { |
| 543 | const sockets = this.socketsByChannel.get(channelId); |
| 544 | if (!sockets) { |
| 545 | return; |
| 546 | } |
| 547 | |
| 548 | sockets.delete(ws); |
| 549 | if (sockets.size === 0) { |
| 550 | this.socketsByChannel.delete(channelId); |
| 551 | } |
| 552 | } |
| 553 | } |