MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / guardSocket

Function guardSocket

apps/api/src/controllers/live.controller.ts:14–18  ·  view source on GitHub ↗
(socket: WebSocket, req: FastifyRequest)

Source from the content-addressed store, hash-verified

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

Callers 4

wsVisitorsFunction · 0.85
wsProjectEventsFunction · 0.85
wsProjectNotificationsFunction · 0.85
wsOrganizationEventsFunction · 0.85

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected