Skip to content

Commit

Permalink
Enable multiple connections with WinHttpHandler by default (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Apr 18, 2024
1 parent 2a36215 commit c9c902c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Shared/HttpHandlerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public static HttpMessageHandler CreatePrimaryHandler()
#endif

#if NET462
return new WinHttpHandler();
// Create WinHttpHandler with EnableMultipleHttp2Connections set to true. That will
// allow a gRPC channel to create new connections if the maximum allow concurrency is exceeded.
return new WinHttpHandler
{
EnableMultipleHttp2Connections = true
};
#elif !NETSTANDARD2_0
return new HttpClientHandler();
#else
Expand Down

0 comments on commit c9c902c

Please sign in to comment.