Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Errors in game when the session expires #563

@juanrossi

Description

@juanrossi

Hello, I just had an event with more than 200 concurrent players and had a few error 500.

Searching the case I found out that when the session expires and the players are on the gameboard, they are never redirected to the index, and the server continues to receives requests.

When the enforceLogin() function is called, and the session is not active I'm having the following error:

[Sun Sep  3 14:46:12 2017] [hphp] [23:7f18aa7ff700:63511:000001] [] \nFatal error: Uncaught exception 'IndexRedirectException' with message '' in /var/www/fbctf/src/SessionUtils.php:113\nStack trace:\n#0 /var/www/fbctf/src/data/teams.php(7): SessionUtils::enforceLogin()\n#1 {main}

Although this error should not happen, if it didn't we would be getting a 302 and redirecting all request to index, but the requests would still be happening (and be larger ones).

I think the frontend should validate if the session is valid or not every few requests or minutes, and in case it's not, the user should be redirected to the logout or /index.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions