196 fix: set IsStarted = true in a IApplicationLifetime.ApplicationStarted listener (#197)

This commit is contained in:
davide-romanini
2018-09-02 21:42:57 +02:00
committed by Stef Heyenrath
parent 2075589e98
commit 5ccb992201

View File

@@ -104,7 +104,9 @@ namespace WireMock.Owin
{
try
{
IsStarted = true;
var appLifetime = (IApplicationLifetime) _host.Services.GetService(typeof(IApplicationLifetime));
appLifetime.ApplicationStarted.Register(() => IsStarted = true);
#if NETSTANDARD1_3
_logger.Info("WireMock.Net server using netstandard1.3");
#elif NETSTANDARD2_0