OwenGHB / angband-webclient

Browser client and webserver for playing Angband and variants
http://angband.live
GNU General Public License v2.0
18 stars 7 forks source link

Memory leaks #17

Closed OwenGHB closed 7 years ago

OwenGHB commented 7 years ago

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.

OwenGHB commented 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.

OwenGHB commented 7 years ago

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.