-
Notifications
You must be signed in to change notification settings - Fork 18
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
Attempt at fixing plugin crash #92
base: master
Are you sure you want to change the base?
Conversation
Attempting to fix plugin crashing when a captain leaves during picking. Now when a player disconnects during picking, it just sends the plugin back to warm-up state. This isn't the original intended behavior to avoid re-voting for maps. However, an admin currently has to restart the plugin anyway so this way the plugin should avoid crashing with the same functional behavior.
I made this change without testing it, since it crashes anyway and I am too lazy to go through the whole process of setting up a CS:GO server to test this. We can either say "screw it - we'll do it in production" or someone who has any clue how the previous developer was testing can test this fix. |
Looking at the code I don't think that change will actually prevent the plugin from hanging. If you actually test it and it works then I'll merge this pull req but until then, no. |
As far as how the plugin was tested before, it was by spinning up a server and running it, as that is the only reliable way to actually test a sourcemod plugin. |
Looking at it some more, I think all that needs to be done to fix the issue is to either forcibly unready the disconnected player, or to start the 30 second grace period timer for the disconnected player like with what is done when a player disconnects during an active match. It's been a while, but I think the original intended behavior was to just wait for the disconnected player to come back during team picking forever. Does the plugin actually crash (as in the plugin stops running entirely and generates a sourcemod crash log) on a disconnect during team picking? Or is it just hanging in the captain picking state forever? |
I was only in the server once when it happened, and the problem was that the player wasn't coming back so the plugin was just perpetually waiting. I was late when when I typed crash, I meant hang. Although, good point about forgetting to unready the player. I am going to have to test to see if I have to actually change the plugin state or not. I have never done source modding before so maybe I'll just go find a tutorial on since I am not sure how I will simulate players on a spun-up server. |
also, the admin abortmatch command should just be updated to allow admins to use it during the match setup and team picking phases |
Attempting to fix plugin crashing when a captain leaves during picking. Now when a player disconnects during picking, it just sends the plugin back to warm-up state. This isn't the original intended behavior to avoid re-voting for maps. However, an admin currently has to restart the plugin anyway so this way the plugin should avoid crashing with the same functional behavior.