Skip to content

Commit af907cd

Browse files
Fix #if for full framework SignalR client (#27999)
1 parent 20e2c6f commit af907cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public WebSocketsTransport(HttpConnectionOptions httpConnectionOptions, ILoggerF
4444
{
4545
// Full Framework will throw when trying to set the User-Agent header
4646
// So avoid setting it in netstandard2.0 and only set it in netstandard2.1 and higher
47-
#if !NETSTANDARD2_0
47+
#if !NETSTANDARD2_0 && !NET461
4848
_webSocket.Options.SetRequestHeader("User-Agent", Constants.UserAgentHeader.ToString());
4949
#else
5050
// Set an alternative user agent header on Full framework

0 commit comments

Comments
 (0)