File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/SignalR/common/Http.Connections/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ namespace Microsoft.AspNetCore.Builder
1616 /// </summary>
1717 public static class ConnectionEndpointRouteBuilderExtensions
1818 {
19+ private static readonly NegotiateMetadata _negotiateMetadata = new NegotiateMetadata ( ) ;
20+
1921 /// <summary>
2022 /// Maps incoming requests with the specified path to the provided connection pipeline.
2123 /// </summary>
@@ -101,7 +103,7 @@ public static ConnectionEndpointRouteBuilder MapConnections(this IEndpointRouteB
101103 var negotiateBuilder = endpoints . Map ( pattern + "/negotiate" , negotiateHandler ) ;
102104 conventionBuilders . Add ( negotiateBuilder ) ;
103105 // Add the negotiate metadata so this endpoint can be identified
104- negotiateBuilder . WithMetadata ( new NegotiateMetadata ( ) ) ;
106+ negotiateBuilder . WithMetadata ( _negotiateMetadata ) ;
105107 negotiateBuilder . WithMetadata ( options ) ;
106108
107109 // build the execute handler part of the protocol
You can’t perform that action at this time.
0 commit comments