Skip to content

Commit da30b59

Browse files
committed
Fix
1 parent 5598347 commit da30b59

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Spice/src/Flight/SpiceFlightClient.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,26 @@ private static GrpcChannelOptions GetGrpcChannelOptions(string? appId, string? a
5151
{
5252
options.Credentials = ChannelCredentials.Insecure;
5353
}
54+
#if NET8_0_OR_GREATER
5455
else
5556
{
56-
// Configure HttpHandler for TLS on macOS
57+
// Configure HttpHandler for TLS on macOS (.NET 8.0+)
5758
var handler = new SocketsHttpHandler
5859
{
5960
EnableMultipleHttp2Connections = true
6061
};
6162
options.HttpHandler = handler;
6263
}
64+
#endif
6365
return options;
6466
}
6567

6668
// Set TLS credentials for authenticated connections
6769
options.Credentials = useTls ? ChannelCredentials.SecureSsl : ChannelCredentials.Insecure;
6870

69-
// Configure HttpHandler for TLS on macOS
71+
// Configure HttpHandler for TLS on macOS (.NET 8.0+)
7072
HttpMessageHandler messageHandler;
73+
#if NET8_0_OR_GREATER
7174
if (useTls)
7275
{
7376
messageHandler = new SocketsHttpHandler
@@ -76,6 +79,7 @@ private static GrpcChannelOptions GetGrpcChannelOptions(string? appId, string? a
7679
};
7780
}
7881
else
82+
#endif
7983
{
8084
messageHandler = new HttpClientHandler();
8185
}

0 commit comments

Comments
 (0)