1👍
✅
I found the solution:
For groups, in the “send” method there is the “immediately = False” parameter, just leave it as true and then the function will be executed before adding the new user, so it does not disconnect the new connection.
def send(self, content, immediately=False):
"""
Send a message to all channels in the group.
Sends are delayed until consumer completion. To override this, you
may pass immediately=True.
"""
1👍
see this about accepting connections: Websocket using Django Channels
About having only only connection per user, you’ll have to either reject new connections based on your logic or send a close message upon a websocket.connect to the relevant reply_channel (or channels), which it seems it is what you are trying to do here.
Source:stackexchange.com