I am using SignalR.Orleans as a backplane and face a problem that application can't perform graceful shutdown. I hook an application lifetime event to perform grceful shutdown of the Orleans Client using Close method from IClusterClient interface. After this hook is done, application tries to dispose other parts of the application, and also OrleansHubLifetimeManager signleton that is injected by AddOrleans() method. In Dispose method of the OrleansHubLifetimeManager it stucks on var subscriptions = await _serverStream.GetAllSubscriptionHandles();. I think the problem is that _serverStream is not null even thou IClusterClient is closed (if _serverStream would be null code would never come to this line). So my question is how to perform graceful shutdown of the application?
Last error in the logs:
20180122 09:21:31.311 | 0 | | E | orl | | | Orleans.Messaging.ClientMessageCenter - Ignoring Request *cli/a49dba8d@3c12e688->*grn/716E8E94/ef945988+ORLEANS_SIGNALR_STREAM_PROVIDER_SERVERS_STREAM #15: because the Client message center is not running
I am using SignalR.Orleans as a backplane and face a problem that application can't perform graceful shutdown. I hook an application lifetime event to perform grceful shutdown of the Orleans Client using Close method from IClusterClient interface. After this hook is done, application tries to dispose other parts of the application, and also OrleansHubLifetimeManager signleton that is injected by AddOrleans() method. In Dispose method of the OrleansHubLifetimeManager it stucks on
var subscriptions = await _serverStream.GetAllSubscriptionHandles();
. I think the problem is that _serverStream is not null even thou IClusterClient is closed (if _serverStream would be null code would never come to this line). So my question is how to perform graceful shutdown of the application?Last error in the logs:
20180122 09:21:31.311 | 0 | | E | orl | | | Orleans.Messaging.ClientMessageCenter - Ignoring Request *cli/a49dba8d@3c12e688->*grn/716E8E94/ef945988+ORLEANS_SIGNALR_STREAM_PROVIDER_SERVERS_STREAM #15: because the Client message center is not running