File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal Expand file tree Collapse file tree 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)
131131#pragma warning disable CA1810 // Initialize all static fields in 'MsQuicApi' when those fields are declared and remove the explicit static constructor
132132 static MsQuicApi ( )
133133 {
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
134143 if ( OperatingSystem . IsWindows ( ) && ! IsWindowsVersionSupported ( ) )
135144 {
136145 if ( NetEventSource . Log . IsEnabled ( ) )
@@ -163,7 +172,7 @@ static MsQuicApi()
163172 // Gracefully close the API table to free resources. The API table will be allocated lazily again if needed
164173 MsQuicClose ( apiTable ) ;
165174 }
166- #pragma warning restore CA1810
175+ #pragma warning restore CA1810 , CS0162
167176
168177 private static MsQuicApi AllocateMsQuicApi ( )
169178 {
You can’t perform that action at this time.
0 commit comments