socket.io
socket.io copied to clipboard
await memory leak
export async function queryid(sendTo,type, params){ var socketList = await io.fetchSockets() for(let index in socketList){ if (socketList[index].name==sendTo){ socketList[index].emit(type,params) return true } } return false }
when i run await queryid(1) will lead memory leak
i need know if one socket is online?how i refactor my code
you can at least format the code for us