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

Fixed nullref exception after stopping the KcpServer #47

Conversation

alex89200
Copy link

After calling KcpServer.Stop() method it destroys underlying socket, but don't clear the connections list. At the next Tick those connections tries to send a "Disconnect" message and throws exceptions because socket doesn't exist anymore.
Moreover, if you start the server again - those connections remain in the list and will spam errors trying to Disconnect themselves and failing due to wrong socket binding.

In short. We need to clear existing connections when stoppping the server.

@miwarnec miwarnec force-pushed the master branch 3 times, most recently from d6ae9fe to eeb25ed Compare April 7, 2023 02:40
@miwarnec
Copy link
Collaborator

thanks, will check this week

@miwarnec miwarnec closed this in e46df2f Jun 10, 2023
@miwarnec
Copy link
Collaborator

fixed, thanks

@alex89200 alex89200 deleted the fix/kcpserver-stop-flush-nullref branch June 14, 2023 09:52
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