p3x-redis-ui-server
Version:
🏍️ P3X Redis UI server — Socket.IO backend for the dual Angular + React frontend with AI queries, 54 languages, and auto data decompression
2 lines (1 loc) • 495 B
JavaScript
import*as o from"../../shared.mjs";const n="socket.io connection disconnect";export default async e=>{const{socket:s,payload:c}=e,{connectionId:t}=c;console.warn(n,"connectionId",t,"socket.p3xrs.connectionId",s.p3xrs.connectionId);try{s.p3xrs.connectionId===t&&(console.warn(n,"will disconnect from redis"),o.disconnectRedis({socket:s})),s.emit(e.responseEvent,{status:"ok"})}catch(o){console.error(o),s.emit(e.responseEvent,{status:"error",error:o.message})}finally{o.sendStatus({socket:s})}};