Fix #if for full framework SignalR client (#27999)

This commit is contained in:
Brennan 2020-11-23 10:30:27 -08:00 committed by GitHub
parent 20e2c6fcae
commit af907cdea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal
{ {
// Full Framework will throw when trying to set the User-Agent header // Full Framework will throw when trying to set the User-Agent header
// So avoid setting it in netstandard2.0 and only set it in netstandard2.1 and higher // So avoid setting it in netstandard2.0 and only set it in netstandard2.1 and higher
#if !NETSTANDARD2_0 #if !NETSTANDARD2_0 && !NET461
_webSocket.Options.SetRequestHeader("User-Agent", Constants.UserAgentHeader.ToString()); _webSocket.Options.SetRequestHeader("User-Agent", Constants.UserAgentHeader.ToString());
#else #else
// Set an alternative user agent header on Full framework // Set an alternative user agent header on Full framework