React to DependencyInjection changes (#869)
This commit is contained in:
parent
6627efecbf
commit
0f1eac5a98
|
|
@ -77,7 +77,8 @@ namespace Microsoft.AspNetCore.Hosting
|
||||||
{
|
{
|
||||||
// It would be nicer if this was transient but we need to pass in the
|
// It would be nicer if this was transient but we need to pass in the
|
||||||
// factory instance directly
|
// factory instance directly
|
||||||
services.AddSingleton(server);
|
// Registering as factory so server gets disposed along with a WebHost
|
||||||
|
services.AddSingleton(provider => server);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue