Small code refactor (#117)

This commit is contained in:
Stef Heyenrath
2018-04-05 20:51:10 +02:00
parent 2d2a2dd6fc
commit 4f294baff2
5 changed files with 5 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ namespace WireMock.Server
/// Gets a value indicating whether this server is started.
/// </summary>
[PublicAPI]
public bool IsStarted { get => _httpServer == null ? false : _httpServer.IsStarted; }
public bool IsStarted => _httpServer != null && _httpServer.IsStarted;
/// <summary>
/// Gets the ports.
@@ -200,7 +200,7 @@ namespace WireMock.Server
{
throw new TimeoutException($"Service start timed out after {TimeSpan.FromMilliseconds(settings.StartTimeout)}");
}
ctsStartTimeout.Token.WaitHandle.WaitOne(100);
ctsStartTimeout.Token.WaitHandle.WaitOne(ServerStartDelay);
}
}