-
Notifications
You must be signed in to change notification settings - Fork 170
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c1e1558
feat(queue): add timeouts
D4isDAVID 1134305
fix(server/queue): use correct player source
D4isDAVID 6f80ad3
refactor(server/queue): move joining timeout code to a new function
D4isDAVID 72c6be7
Merge branch 'main' into feature/queue-timeouts
ChatDisabled File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
return { | ||
---Amount of seconds to wait before removing a player from the queue after disconnecting while waiting. | ||
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.