Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'PLAYER_DISCONNECTED' and RCON race condition results in null player #289

Open
ghost opened this issue Mar 4, 2023 · 0 comments
Open

'PLAYER_DISCONNECTED' and RCON race condition results in null player #289

ghost opened this issue Mar 4, 2023 · 0 comments
Labels
core bug Bug related to the core SquadJS API

Comments

@ghost
Copy link

ghost commented Mar 4, 2023

Description of Issue

A 'PLAYER_DISCONNECTED' event can pass a null player due to a race condition with updating the RCON player list.
If the the main squadjs player list is updated via RCON before the log parser is done updating, a player that causes a disconnect event through the log parser will not exist in the main player list because the RCON updated it before the log parser caught the disconnect event.

Errors or Screenshots of Issue

This happened a while ago (and i created a workaround in my fork of the repo) and thus i don't have logs for it atm. Some suggested fixes would be to manually fill out the player information from the raw information provided by the log parser (essentially what i did for workaround), or to keep track of players that have also recently disconnected.

Log essentially just had the RCON update with a player just moved to the disconnect section then directly after, debug messages for saying that a player disconnect event had happened and then a debug message for saying that it couldn't find the player in the main player list.

Squad Information

  • SquadJS Version: main branch
  • Squad Version: v4.2

Squad Server State

Full player load with lots of log parsing being required.

System Information

  • Operating System: linux
  • NodeJS Version: n/a
  • Yarn Version: n/a
@ghost ghost added the core bug Bug related to the core SquadJS API label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core bug Bug related to the core SquadJS API
Projects
None yet
Development

No branches or pull requests

0 participants