So its happened for the second time now. I believe what triggered the error was when I tried to do an update to my MongoDb server but I still don't know why this happens and I'd like to find out.
Basically I am sending json string data from a C# script to my front end with Signalr using this command:
_hubContext.Clients.All.SendAsync("ReceiveMail", json);
The issue is that my script keeps broadcasting this message (without any errors or issues) but my client side doesnt receive it (even though this broadcast has worked for weeks....). When I change the name of the broadcast to something different the data then makes its way to the client side perfectly.
Example:
//This broadcast worked fine for weeks but suddenly stopped working (without error)
_hubContext.Clients.All.SendAsync("ReceiveMail", json);
//Changed above broadcast to this and broadcast works perfectly fine again
_hubContext.Clients.All.SendAsync("ListenForMail", json);
TS Code:
constructor() {
this.hubConnection = new signalR.HubConnectionBuilder()
.withUrl('http://localhost:57697/chat')
.build();
this.hubConnection
.start()
.then(() => this.table())
.catch(err => console.log('Error while establishing connection :('));
this.hubConnection.on('ReceiveMail', (mailJson: string) => {
this.loadEmail(mailJson);
});
this.hubConnection.on('ReceiveConnection', (msg: string) => {
console.log('Connection: ' + msg);
});
}
Anyone have any insight into this issue?