ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

White screen when rapidly refreshing demo windows #1390

Open ctm opened 5 months ago

ctm commented 5 months ago

Fix so that no matter how often or how quickly, refreshing a demo window doe not lead to a white screen of death.

I just fixed a race condition involving the deleting of table session ids that I think bit jzk yesterday evening. Unfortunately, I didn't have a way to reproduce his error, but I did discover this white screen of death issue and my fix for that race condition did not help here.

This one may be a PITA to track down, because I haven't been able to reproduce it when running locally there is no error message in the JavaScript console when it happens on craftpoker.com. As such, unless I can reproduce it locally, the debug cycle will be a bit slow.

ctm commented 5 months ago

This one is curious. It is much harder to reproduce locally than over craftpoker.com, however in both cases, if I leave the windows alone long enough (a few minutes), everything clears up. I do not see any sign that the rest of craftpoker.com is bogged down, so I don't see this as a potential avenue for a DOS attack. However, if I refresh a demo table enough to get the white screen and then try to log in with a real account from another tab, I get a "Slowly Connecting" message, which I don't get if I use a completely separate browser.

I've removed the high priority and easy labels, because I don't see this problem happening accidentally and it doesn't interfere with anyone else. However, I'm going to take a stab at fixing this before moving on to something else.

The weird thing is the behavior that I'm seeing strongly suggests to me that it's web-socket traffic that is slowing everything down, but I would think that each table window refresh kills the web-socket that belongs to the table window and that killing the web-socket would free up whatever browser resource is getting overloaded.