Closed OwenGHB closed 7 years ago
Spectating is now implemented differently for logged in users vs anon guests. The latter may still produce memory leaks, and will need looking at again.
Actually, closing because ultimately the fix for spectating depends on recording. If there are more memory leaks I'll disable anon spectating until recording is in.
It's come to my attention that the methods used for event emitters on the server side have lead to server crashes due to memory leaks. First fix is to replace .on() calls with .once() calls where appropriate.
I suspect the real issue is in the spectating function - currently spectating adds new event halders to each game for every spectator. I could quite easily fix this, if spectating were disallowed for users who are not logged in.