koa-socket-2
koa-socket-2 copied to clipboard
Cannot read property 'join' of undefined
io.on('connection', async (ctx: any, data: any) => {
console.log(`client has connected...`);
ctx.socket.join('some_room');
console.log('ROOMS:::' + ctx.socket.rooms);
})
why? Everything else working...
having the same issue, any idea what could cause it?