-
Notifications
You must be signed in to change notification settings - Fork 385
Description
We have a .NET 6 project using Azure.SignalR (v. 1.25.2) and an Angular 16 FE.
We created two hubs (x and y).
We are sending images through SignalR, and it works fine, the images are transported through the devices correctly, but when we are establishing the connections, the OnConnectedAsync is not called (to be precise, it's being called randomly, a few times out of many).
In reality, the connection is made - in the Chrome console, I can see that the web socket is connected, and as I said we can transfer the images easily.
The issue is that we are managing a dictionary with the users connected to the hub and this dictionary is being handled in the OnConnectedAsync & OnDisconnectedAsync. Because these methods are not being invoked for some reason, our UI is showing a false negative message when a user wants to see if someone is connected to get the images.
this.hubConnection = new HubConnectionBuilder()
.withUrl(hubUrl, transportType)
.withAutomaticReconnect([2, 3, 3, 3, 3])
.build();
I could see 2 similar issues on github, but not 100% the same, as they had issue sending things through their SignalR, while we don't have that, we can send our data correctly, but the methods are just not being invoked.
The same issue persists if we use the old SignalR, not the Azure one.