Fix double-lock deadlock with SemaphoreSlim and GameServer, fix sockets going stale after a client uncleanly disconnects and add adjustable logging post build#4
Open
derole1 wants to merge 16 commits intoennuo:mainfrom
Conversation
…o adjust LogLevel via config
… occurs that can cause a deadlock on the GameServer tick thread in some rare cases, remove logging for alreadyLoggedIn state
Collaborator
Author
|
Ready for review :) Have tested the timeouts with a quick 3 player lobby on 2 less-than-favourable spec wise computers and my main pc with no issue it seems unless the emulator is paused for more than 10 seconds, in which case it just boots them to modspot and after a quick reconnect they are back up and running again |
…it currently causes instability
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes an issue where, in specific circumstances, a single thread would call SemaphoreSlim.Wait twice, causing a deadlock as the second wait will wait on the first wait to be released, which cannot be released as the thread is halted.
This PR also adds the necessary WSL debug environment variables (let me know if these need to be removed but I dont see an issue as it removes steps from setting up a debug environment) and also allows adjustment of logging outside the debug environment which is useful for troubleshooting