File tree 1 file changed +10
-1
lines changed
src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,15 @@ private MsQuicApi(NativeApi* vtable)
131
131
#pragma warning disable CA1810 // Initialize all static fields in 'MsQuicApi' when those fields are declared and remove the explicit static constructor
132
132
static MsQuicApi ( )
133
133
{
134
+ // Completely disabled QUIC.
135
+ IsQuicSupported = false ;
136
+ if ( NetEventSource . Log . IsEnabled ( ) )
137
+ {
138
+ NetEventSource . Info ( null , $ "QUIC is completely disabled in .NET 6 due to critical defects fixed in later versions.") ;
139
+ }
140
+ return ;
141
+
142
+ #pragma warning disable CS0162 // Unreachable code detected -- leaving the original code intact, instead of removing big chunks of code transitively
134
143
if ( OperatingSystem . IsWindows ( ) && ! IsWindowsVersionSupported ( ) )
135
144
{
136
145
if ( NetEventSource . Log . IsEnabled ( ) )
@@ -163,7 +172,7 @@ static MsQuicApi()
163
172
// Gracefully close the API table to free resources. The API table will be allocated lazily again if needed
164
173
MsQuicClose ( apiTable ) ;
165
174
}
166
- #pragma warning restore CA1810
175
+ #pragma warning restore CA1810 , CS0162
167
176
168
177
private static MsQuicApi AllocateMsQuicApi ( )
169
178
{
You can’t perform that action at this time.
0 commit comments