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

Attempt at fixing plugin crash #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vpillinger
Copy link

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.

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.
@vpillinger
Copy link
Author

vpillinger commented May 7, 2016

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.

@pmrowla
Copy link
Member

pmrowla commented May 7, 2016

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.

@pmrowla
Copy link
Member

pmrowla commented May 7, 2016

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.

@pmrowla
Copy link
Member

pmrowla commented May 7, 2016

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.

https://github.com/goonpug/goonpug/blob/master/csgo/addons/sourcemod/scripting/goonpug.sp#L1142-L1147

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?

@vpillinger
Copy link
Author

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.

@pmrowla
Copy link
Member

pmrowla commented May 8, 2016

also, the admin abortmatch command should just be updated to allow admins to use it during the match setup and team picking phases

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.

2 participants