Hi @endel, thanks for your quick answer. I understand why I was struggling now !
With your fix, I still can't deliver my messages to all clients.
For now I did this on async for testing purposes, but it's really ugly and unreliable
if (this.hasReachedMaxClients()) {
setTimeout(async () => {
for (let sessionId in this.clients) {
this.send(this.clients[sessionId], { message: "Hello world!" });
}
}
}, 1000);
If you have a better way, I'll take it !
Have a nice day !