Closed DarkAce65 closed 1 year ago
Also happy to put in a PR to fix this if it's as simple as updating that single conditional and adding some tests
Thanks! This was an unintentional omission, back when I added this option I only implemented it for the sync server.
Describe the bug Hello, big fan of this library, thank you for maintaining it! I wanted to report what looks like a bug in the
AsyncManager
's emit method. Based on the docs for emit, it seems like I can pass alist
of recipients to theto
/room
argument to emit an event to multiple rooms but I get the error shown below:^
room
here is alist
which is not hashable and is throwing thisTypeError
https://github.com/miguelgrinberg/python-socketio/blob/81f872c17051b0d1d0cea7ca49a3bdca6f6bae1d/src/socketio/asyncio_manager.py#L18To Reproduce I made a simple client/server setup to verify this and confirmed that it only affects the async version of the server (the synchronous server seems to work as expected).
server.py
client.py
Expected behavior I'd expect no error to be raised and that a message would be emitted to the unique list of participants for the list of ids passed to
emit()
(ex. if I emit to a list of room ids, each client in at least one of the rooms would receive one and only one message).Logs Server logs: