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

feat(queue): add timeouts #285

Merged
merged 4 commits into from
Dec 24, 2023
Merged

feat(queue): add timeouts #285

merged 4 commits into from
Dec 24, 2023

Conversation

D4isDAVID
Copy link
Member

Description

Adds timeouts to the queue system, letting players reconnect after a configurable amount of time after disconnecting.

Players that passed the queue and disconnected while downloading server data will also be able to reconnect after a configurable amount of time.

See #279 for additional context.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@D4isDAVID D4isDAVID force-pushed the feature/queue-timeouts branch 2 times, most recently from 96511c5 to 77dd947 Compare December 17, 2023 23:35
@D4isDAVID D4isDAVID force-pushed the feature/queue-timeouts branch from 77dd947 to 1134305 Compare December 20, 2023 23:30
Comment on lines +3 to +7
timeoutSeconds = 30,

---Amount of seconds to wait before removing a player from the queue after disconnecting while installing server data.
---Notice that an additional ~2 minutes will be waited due to limitations with how FiveM handles joining players.
joiningTimeoutSeconds = 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by the nuance difference here. It seems like the first one is the timeout while the player is in the queue and the second is the timeout when the player is effectively first in line -- that is there is an open slot and they are downloading the assets to be let in? Is it worth specifying both of these config options? Why would someone want to set these to different values?

Copy link
Member Author

@D4isDAVID D4isDAVID Dec 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main reason I added this is that connectqueue also has it (link), but connectqueue waits until the client sends a custom event to the server - meaning after the player downloaded the server content and passed the loading screen, however this system waits for playerJoining, so I don't account for players that disconnect in the loading screen.

Currently the way the queue works is that after the player is first in line, when there is an available slot, the player is let into the server and dequeued, so now they are installing server content and technically they are no longer first in line; they're already past that.

Obviously this can change if need be.

@ChatDisabled ChatDisabled merged commit a81b39e into main Dec 24, 2023
3 of 4 checks passed
@ChatDisabled ChatDisabled deleted the feature/queue-timeouts branch December 24, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants