diff --git a/src/server/api/websocket.ts b/src/server/api/websocket.ts index 63a1251..3f3152f 100644 --- a/src/server/api/websocket.ts +++ b/src/server/api/websocket.ts @@ -2,7 +2,7 @@ const logger = useLogger('websocket') export default defineWebSocketHandler({ async open(peer) { - logger.info('New peer', peer) + logger.info('Peer connected', peer) const storage = useStorage('data') await storage.watch(async (_, key) => { @@ -21,4 +21,7 @@ export default defineWebSocketHandler({ peer.send({ event: 'pong' }) } }, + async close(peer) { + logger.info('Peer disconnected', peer) + }, })