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

Add the reason argument for async_admin when socket disconnect #1423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Yixiu1121
Copy link

Hi,

I am using python-socketio with an Admin UI and noticed that the disconnect reason is not being displayed. I have made some modifications to address this issue. Could you please review my pull request?

Thank you for your time and consideration!

@miguelgrinberg
Copy link
Owner

Good catch, I forgot that the Admin UI can show the reason. Thank you so much, I'll review your change and merge over the next few days.

@@ -585,7 +585,7 @@ async def _handle_disconnect(self, eio_sid, namespace, reason=None):
self.manager.pre_disconnect(sid, namespace=namespace)
await self._trigger_event('disconnect', namespace, sid,
reason or self.reason.CLIENT_DISCONNECT)
await self.manager.disconnect(sid, namespace, ignore_queue=True)
await self.manager.disconnect(sid, namespace, reason=reason or self.reason.CLIENT_DISCONNECT, ignore_queue=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants