Merge branch 'benaadams/negative-threads' into dev

This commit is contained in:
Stephen Halter 2015-09-10 11:58:09 -07:00
commit 813127e7f6
1 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,13 @@ namespace Microsoft.AspNet.Server.Kestrel
disposables.Push(engine);
if (information.ThreadCount < 0)
{
throw new ArgumentOutOfRangeException(nameof(information.ThreadCount),
information.ThreadCount,
"ThreadCount cannot be negative");
}
engine.Start(information.ThreadCount == 0 ? 1 : information.ThreadCount);
foreach (var address in information.Addresses)