socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

await memory leak

Open leviluo opened this issue 3 years ago • 1 comments

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

leviluo avatar Jul 02 '22 14:07 leviluo

you can at least format the code for us

dhenson02 avatar Jul 14 '22 17:07 dhenson02