From 9901f0f3e4f9bf7053fa7f4b072cb72d67bedb43 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 14 Mar 2018 11:50:10 -0700 Subject: [PATCH] Default to the managed socket transport (#2392) --- samples/SampleApp/SampleApp.csproj | 1 + samples/SystemdTestApp/SystemdTestApp.csproj | 1 + src/Kestrel/Kestrel.csproj | 3 --- src/Kestrel/WebHostBuilderKestrelExtensions.cs | 4 ++-- test/Kestrel.Tests/Kestrel.Tests.csproj | 1 + test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 112987f619..036867ebc1 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -9,6 +9,7 @@ + diff --git a/samples/SystemdTestApp/SystemdTestApp.csproj b/samples/SystemdTestApp/SystemdTestApp.csproj index 08a5547858..28c159a38e 100644 --- a/samples/SystemdTestApp/SystemdTestApp.csproj +++ b/samples/SystemdTestApp/SystemdTestApp.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Kestrel/Kestrel.csproj b/src/Kestrel/Kestrel.csproj index 55f910ddcf..f097863086 100644 --- a/src/Kestrel/Kestrel.csproj +++ b/src/Kestrel/Kestrel.csproj @@ -17,9 +17,6 @@ - - - diff --git a/src/Kestrel/WebHostBuilderKestrelExtensions.cs b/src/Kestrel/WebHostBuilderKestrelExtensions.cs index 70b1a34d74..6552da10f2 100644 --- a/src/Kestrel/WebHostBuilderKestrelExtensions.cs +++ b/src/Kestrel/WebHostBuilderKestrelExtensions.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; -using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv; +using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Hosting return hostBuilder.ConfigureServices(services => { // Don't override an already-configured transport - services.TryAddSingleton(); + services.TryAddSingleton(); services.AddTransient, KestrelServerOptionsSetup>(); services.AddSingleton(); diff --git a/test/Kestrel.Tests/Kestrel.Tests.csproj b/test/Kestrel.Tests/Kestrel.Tests.csproj index c26558bb08..d383f39603 100644 --- a/test/Kestrel.Tests/Kestrel.Tests.csproj +++ b/test/Kestrel.Tests/Kestrel.Tests.csproj @@ -13,6 +13,7 @@ + diff --git a/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs b/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs index 3c10c1c0ff..bc0eff8af8 100644 --- a/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs +++ b/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs @@ -51,13 +51,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests } [Fact] - public void LibuvIsTheDefaultTransport() + public void SocketTransportIsTheDefault() { var hostBuilder = new WebHostBuilder() .UseKestrel() .Configure(app => { }); - Assert.IsType(hostBuilder.Build().Services.GetService()); + Assert.IsType(hostBuilder.Build().Services.GetService()); } [Fact]