(socket: WebSocket, req: FastifyRequest)
| 12 | // whole process. The ws library always emits 'close' after 'error', so |
| 13 | // the existing close-based cleanup still runs. |
| 14 | function guardSocket(socket: WebSocket, req: FastifyRequest) { |
| 15 | socket.on('error', (err) => { |
| 16 | req.log.warn({ err }, 'ws socket error'); |
| 17 | }); |
| 18 | } |
| 19 | |
| 20 | export function wsVisitors( |
| 21 | socket: WebSocket, |
no test coverage detected