SignalR client receives Information: Connection disconnected from hub

Viewed 43

I created a signalR JavaScript client that needs to communicate with a hosted signalR server (from Playfab). I successfully created the signalR client and connected it with the server, but the problem that I'm facing is that the connection doesn't stay open more than 30 seconds even though I subscribe to events.

Here are the messages between the client and server. After one ping, the server sends a close message. Messages between client and server

How can I prevent this from happening?

Here is how the connection is created

connection = new signalR.HubConnectionBuilder()
 .withUrl(`url`, {
   withCredentials: false,
   httpClient: new SignalRClient(),
   headers: {
     'X-EntityToken': entity.EntityToken,
   },
 })
 .build()
await connection.start()
1 Answers

I encountered the same problem today. Haven’t touched or changed the code anything in a while and all of a sudden this started happening. I’m using Azure SignalR service.

Related