If Groups.Add or Groups.Remove is called inside a Hub or PersistentConnection from a server that is not handling the /connect request for the caller and not handling the /connect request for the client being added or removed from a group (this may or may not be the caller itself), then the call to Groups.Add or Groups.Remove will never complete successfully and instead timeout after 30 seconds by canceling the returned task.
If Groups.Add or Groups.Remove is called on an IHubContext or IPersistentConnectionContext returned from ConnectionManager, the returned task will be canceled if the client being added or removed is not connected to the same server that is making the call.
In both cases, this issue is being caused by not having any subscriptions to the signal needed to receive the group add/remove ACKs on the server making the call to Add or Remove.
If
Groups.AddorGroups.Removeis called inside a Hub or PersistentConnection from a server that is not handling the /connect request for the caller and not handling the /connect request for the client being added or removed from a group (this may or may not be the caller itself), then the call toGroups.AddorGroups.Removewill never complete successfully and instead timeout after 30 seconds by canceling the returned task.If
Groups.AddorGroups.Removeis called on anIHubContextorIPersistentConnectionContextreturned fromConnectionManager, the returned task will be canceled if the client being added or removed is not connected to the same server that is making the call.In both cases, this issue is being caused by not having any subscriptions to the signal needed to receive the group add/remove ACKs on the server making the call to
AddorRemove.