Skip to content

RedisHubLifetimeManager does not allow adding new connection to existing group. #22751

@panoj

Description

@panoj

src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs

The AddToGroupAsync in the RedisHubLifeTimeManager does not allow adding new connections to existing group.

Please let me know how do i navigate past this issue.

Below method is called from AddToGroupAsync. The condition If(groups.Add(groupName)) does not allow to add connection to existing groups.

private Task AddGroupAsyncCore(HubConnectionContext connection, string groupName)
{
var feature = connection.Features.Get();
var groupNames = feature.Groups;

        lock (groupNames)
        {
            // Connection already in group
            if (!groupNames.Add(groupName))
            {
                return Task.CompletedTask;
            }
        }

        var groupChannel = _channels.Group(groupName);
        return _groups.AddSubscriptionAsync(groupChannel, connection, SubscribeToGroupAsync);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions