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

Wait before closing socket on fatal error #310

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

Raicuparta
Copy link
Member

@Raicuparta Raicuparta commented Aug 11, 2020

In some very specific cases, messages can be lost when closing the socket, meaning the game would crash without showing the fatal error message.

I'm using Thread.Sleep but I felt like it was alright since it's only for shutting down the game. Any better way to wait?

I tried a lot of other stuff to make the socket close gracefully without failing to send a message, but for whatever reason none of it worked. It only seems to be a problem with the mod manager, so I suspect it is a problem with node closing the socket too soon on that side, but I had no luck fixing the problem in the manager's end.

@Raicuparta Raicuparta changed the base branch from master to dev August 11, 2020 18:03
@Raicuparta Raicuparta merged commit 1fc18b4 into dev Aug 11, 2020
@Raicuparta Raicuparta deleted the raicuparta/wait-before-fatal branch August 11, 2020 18:07
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