Use IApplicationLifetime.StopApplication instead of
IApplicationShutdown.
React to hosting changes 374526b270
This commit is contained in:
parent
ef38f5589d
commit
6aaa3cbe06
|
|
@ -232,7 +232,7 @@ namespace Microsoft.AspNet.Server.Kestrel
|
||||||
_closeError = ExceptionDispatchInfo.Capture(ex);
|
_closeError = ExceptionDispatchInfo.Capture(ex);
|
||||||
// Request shutdown so we can rethrow this exception
|
// Request shutdown so we can rethrow this exception
|
||||||
// in Stop which should be observable.
|
// in Stop which should be observable.
|
||||||
_appLifetime.RequestShutdown();
|
_appLifetime.StopApplication();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using Microsoft.AspNet.Hosting;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Server.KestrelTests
|
namespace Microsoft.AspNet.Server.KestrelTests
|
||||||
{
|
{
|
||||||
public class ShutdownNotImplemented : IApplicationLifetime
|
public class LifetimeNotImplemented : IApplicationLifetime
|
||||||
{
|
{
|
||||||
public CancellationToken ApplicationStarted
|
public CancellationToken ApplicationStarted
|
||||||
{
|
{
|
||||||
|
|
@ -33,15 +33,7 @@ namespace Microsoft.AspNet.Server.KestrelTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CancellationToken ShutdownRequested
|
public void StopApplication()
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RequestShutdown()
|
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.AspNet.Server.KestrelTests
|
||||||
{
|
{
|
||||||
public TestServiceContext()
|
public TestServiceContext()
|
||||||
{
|
{
|
||||||
AppLifetime = new ShutdownNotImplemented();
|
AppLifetime = new LifetimeNotImplemented();
|
||||||
Log = new TestKestrelTrace();
|
Log = new TestKestrelTrace();
|
||||||
DateHeaderValueManager = new TestDateHeaderValueManager();
|
DateHeaderValueManager = new TestDateHeaderValueManager();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue