Closed LiamMorrow closed 1 year ago
Describe the bug Right now the backplane waits an arbitrary 5 seconds before subscribing to messages. This is to give the IClusterClient time to be ready - if it's not ready it will throw a null pointer exception (can see this when running the example project and removing the delay). Delay: https://github.com/LiamMorrow/OrgnalR/blob/master/src/OrgnalR.Backplane/OrgnalRHubLifetimeManager.cs#L81
To Reproduce
Expected behavior No null pointer
Additional context Orleans provides hooks into its lifecycle via the LifeCycleParticipant interface. This could likely be used to delay subscribing until it is ready: https://learn.microsoft.com/en-us/dotnet/orleans/implementation/orleans-lifecycle
Describe the bug Right now the backplane waits an arbitrary 5 seconds before subscribing to messages. This is to give the IClusterClient time to be ready - if it's not ready it will throw a null pointer exception (can see this when running the example project and removing the delay). Delay: https://github.com/LiamMorrow/OrgnalR/blob/master/src/OrgnalR.Backplane/OrgnalRHubLifetimeManager.cs#L81
To Reproduce
Expected behavior No null pointer
Additional context Orleans provides hooks into its lifecycle via the LifeCycleParticipant interface. This could likely be used to delay subscribing until it is ready: https://learn.microsoft.com/en-us/dotnet/orleans/implementation/orleans-lifecycle