Debug signalr
This commit is contained in:
@@ -23,6 +23,19 @@ public class GameHubNode : IAsyncDisposable
|
||||
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets;
|
||||
})
|
||||
.Build();
|
||||
|
||||
this.hubConnection.Closed += this.HubConnection_Closed;
|
||||
}
|
||||
|
||||
private Task HubConnection_Closed(Exception? arg)
|
||||
{
|
||||
Console.WriteLine("SignalR connection closed");
|
||||
if (arg != null)
|
||||
{
|
||||
Console.WriteLine("Because {0}", arg.Message);
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public bool IsConnected => this.hubConnection.State == HubConnectionState.Connected;
|
||||
|
||||
Reference in New Issue
Block a user