From 64e9cba14d18bd8d731a8a9ebd8f346c641777c8 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 20 Apr 2017 14:17:45 -0700 Subject: [PATCH] fix build broken by PlatformAbstractions (#409) --- .../ServerSentEventsTransport.cs | 7 +++++-- .../AutobahnTests.cs | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.AspNetCore.Sockets.Client/ServerSentEventsTransport.cs b/src/Microsoft.AspNetCore.Sockets.Client/ServerSentEventsTransport.cs index a675ee7e95..42e17344a3 100644 --- a/src/Microsoft.AspNetCore.Sockets.Client/ServerSentEventsTransport.cs +++ b/src/Microsoft.AspNetCore.Sockets.Client/ServerSentEventsTransport.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -60,7 +60,10 @@ namespace Microsoft.AspNetCore.Sockets.Client Running = Task.WhenAll(sendTask, receiveTask).ContinueWith(t => { - if (t.Exception != null) { _logger.LogError(t.Exception, "Transport stopped"); } + if (t.Exception != null) + { + _logger.LogError(0, t.Exception.InnerException, "Transport stopped"); + } _application.Output.TryComplete(t.IsFaulted ? t.Exception.InnerException : null); return t; diff --git a/test/Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest/AutobahnTests.cs b/test/Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest/AutobahnTests.cs index 9ea7ddb61a..048e88ab8c 100644 --- a/test/Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest/AutobahnTests.cs +++ b/test/Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest/AutobahnTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest.Autobahn; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.PlatformAbstractions; using Xunit.Abstractions; namespace Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest @@ -31,7 +30,7 @@ namespace Microsoft.AspNetCore.WebSockets.Internal.ConformanceTest var reportDir = Environment.GetEnvironmentVariable("AUTOBAHN_SUITES_REPORT_DIR"); var outDir = !string.IsNullOrEmpty(reportDir) ? reportDir : - Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "autobahnreports"); + Path.Combine(AppContext.BaseDirectory, "autobahnreports"); if (Directory.Exists(outDir)) {