Skip to content

SignalR server not sending keep-alive ping messages not sure why #26056

Answered by dazinator
dazinator asked this question in General
Discussion options

You must be logged in to vote

Ok so my issue turned out to be that I was not getting the same instance of IHostApplicationLifetime from the tenants child container as was registered in the application container - tenants were getting their own singleton instances of this. On those "per tenant" instances, they were never having the lifetime event called, and so the background ping method was never initiated.

https://github.com/dotnet/runtime/blob/6072e4d3a7a2a1493f514cdf4be75a3d56580e84/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs#L215

This is something I'll need to fix in terms of how that service is resolved from child containers.

Replies: 4 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@BrennanConroy
Comment options

@dazinator
Comment options

@dazinator
Comment options

Comment options

You must be logged in to vote
8 replies
@dazinator
Comment options

@dazinator
Comment options

@dazinator
Comment options

@davidfowl
Comment options

@dazinator
Comment options

Comment options

You must be logged in to vote
1 reply
@dazinator
Comment options

Answer selected by dazinator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants