Let's start with a simple code snippet:
var groupName = string.Format("channel/{0}/{1}", channelNumber, language);
var hubContext = GlobalHost.ConnectionManager.GetHubContext<LiveFeedHub>();
await hubContext.Groups.Add(connectionID, groupName);
await hubContext.Clients.Client(connectionID).init(initPackage);
So i want to add a connectionID to a group and then send a message to the client.
The problem is that the await for the first Task never completes. If i remove the await, the connectionID is added to the group successfully! I know it because the client receives broadcast messages for this group afterwards. The await for the second Task works perfectly fine.
This is my setup:
- The system works with SignalR Scaleout 2.0.3.
- The Scaleout backplane is using Service Bus for Windows 1.1.
- The code runs in a Windows Services on the backend.
- The clients connect to the hub via a website running on IIS.
Btw. The same is true for hubContext.Groups.Remove(..). If you await the completion of the remove operation, you have to wait forever.
Thanks a lot for your help!
Let's start with a simple code snippet:
So i want to add a connectionID to a group and then send a message to the client.
The problem is that the await for the first Task never completes. If i remove the await, the connectionID is added to the group successfully! I know it because the client receives broadcast messages for this group afterwards. The await for the second Task works perfectly fine.
This is my setup:
Btw. The same is true for hubContext.Groups.Remove(..). If you await the completion of the remove operation, you have to wait forever.
Thanks a lot for your help!