GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
e.g. in server:
protected override async Task OnConnectedAsync(IRequest request, string connectionId)
await Groups.Add(connectionId, "group1");
await Groups.Add(connectionId, "group2");
await Groups.Add(connectionId, "group3");
protected override Task OnReceivedAsync(IRequest request, string connectionId, string data)
return base.OnReceivedAsync(request, connectionId, data);
when client webSockets connection is connected and send message to server, server OnReceivedAsync get called, in this case OnConnectedAsync could still not complete, the group2 or group3 could still not added in group, so the Groups.Send("group2", "group2") or Groups.Send("group3", "group3") couldn't make to client.
We can fix this by sending an "init" payload on connect similar to the serverSentEvents transport and not raising connect in the client until that payload is received. Not critical for 1.0 RTW.
Closing this as a dupe of #1984