Skip to content

Call disconnect callback after client removal #124

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

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

Conversation

MaelkMark
Copy link

Call the self.client_left() disconnect callback after removing the client from the self.clients list.

When a client disconnects, it first removes the client from the self.clients list, and only then calls the self.client_left() callback to make sure the program doesn't get false data. Just like when a new client connects: first it adds the client to the self.clients list and only then calls the self.new_client callback.

This change makes the connection/disconnection callbacks more reliable and consistent.

Call the self.client_left() disconnect callback after removing the client from the self.clients list.
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.

1 participant