diff --git a/src/Kestrel/ServerRequest.cs b/src/Kestrel/ServerRequest.cs index e1ac126af5..c766c99c49 100644 --- a/src/Kestrel/ServerRequest.cs +++ b/src/Kestrel/ServerRequest.cs @@ -221,7 +221,7 @@ namespace Kestrel } } - async Task IHttpUpgradeFeature.UpgradeAsync() + Task IHttpUpgradeFeature.UpgradeAsync() { _frame.StatusCode = 101; _frame.ReasonPhrase = "Switching Protocols"; @@ -235,7 +235,7 @@ namespace Kestrel } } _frame.ProduceStart(); - return _frame.DuplexStream; + return Task.FromResult(_frame.DuplexStream); } } } diff --git a/src/Microsoft.AspNet.Server.Kestrel/Http/FrameDuplexStream.cs b/src/Microsoft.AspNet.Server.Kestrel/Http/FrameDuplexStream.cs index 98d09be383..58b2c88d0a 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Http/FrameDuplexStream.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Http/FrameDuplexStream.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if DNX451 using System; +#endif using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/src/Microsoft.AspNet.Server.Kestrel/Http/SocketOutput.cs b/src/Microsoft.AspNet.Server.Kestrel/Http/SocketOutput.cs index 45253dfe98..78ab050e31 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Http/SocketOutput.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Http/SocketOutput.cs @@ -1,11 +1,11 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Server.Kestrel.Networking; using System; using System.Collections.Generic; -using System.Threading; using System.Diagnostics; +using System.Threading; +using Microsoft.AspNet.Server.Kestrel.Networking; namespace Microsoft.AspNet.Server.Kestrel.Http { diff --git a/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs index 4ca8ae6648..6b9ed7c728 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/EngineTests.cs @@ -76,7 +76,7 @@ namespace Microsoft.AspNet.Server.KestrelTests } [Fact] - public async Task EngineCanStartAndStop() + public void EngineCanStartAndStop() { var engine = new KestrelEngine(LibraryManager, new ShutdownNotImplemented()); engine.Start(1); @@ -84,7 +84,7 @@ namespace Microsoft.AspNet.Server.KestrelTests } [Fact] - public async Task ListenerCanCreateAndDispose() + public void ListenerCanCreateAndDispose() { var engine = new KestrelEngine(LibraryManager, new ShutdownNotImplemented()); engine.Start(1); @@ -95,7 +95,7 @@ namespace Microsoft.AspNet.Server.KestrelTests [Fact] - public async Task ConnectionCanReadAndWrite() + public void ConnectionCanReadAndWrite() { var engine = new KestrelEngine(LibraryManager, new ShutdownNotImplemented()); engine.Start(1); diff --git a/test/Microsoft.AspNet.Server.KestrelTests/MessageBodyTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/MessageBodyTests.cs index 5a66846619..54f6e98509 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/MessageBodyTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/MessageBodyTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Server.KestrelTests public class MessageBodyTests { [Fact] - public async Task Http10ConnectionClose() + public void Http10ConnectionClose() { var input = new TestInput(); var body = MessageBody.For("HTTP/1.0", new Dictionary(), input.FrameContext); diff --git a/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs index f5f4b42d6c..4e381b079d 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/NetworkingTests.cs @@ -45,7 +45,7 @@ namespace Microsoft.AspNet.Server.KestrelTests } [Fact] - public async Task LoopCanBeInitAndClose() + public void LoopCanBeInitAndClose() { var loop = new UvLoopHandle(); loop.Init(_uv); @@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Server.KestrelTests } [Fact] - public async Task AsyncCanBeSent() + public void AsyncCanBeSent() { var loop = new UvLoopHandle(); loop.Init(_uv); @@ -72,7 +72,7 @@ namespace Microsoft.AspNet.Server.KestrelTests } [Fact] - public async Task SocketCanBeInitAndClose() + public void SocketCanBeInitAndClose() { var loop = new UvLoopHandle(); loop.Init(_uv);