Skip to content

Commit 482a28b

Browse files
authored
[SignalR] Fix a ServiceEndpoints binding bug that creating new persistent connections for each request (Azure#26165)
1 parent 1c906b8 commit 482a28b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/signalr/Microsoft.Azure.WebJobs.Extensions.SignalRService/src/Bindings/SignalRInputBindings/SignalREndpointsInputBinding/SignalREndpointsAsyncConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public SignalREndpointsAsyncConverter(IServiceManagerStore serviceManagerStore)
2020

2121
public async Task<ServiceEndpoint[]> ConvertAsync(SignalREndpointsAttribute input, CancellationToken cancellationToken)
2222
{
23-
var hubContext = await _serviceManagerStore.GetOrAddByConnectionStringKey(input.ConnectionStringSetting).ServiceManager.CreateHubContextAsync(input.HubName, cancellationToken: cancellationToken).ConfigureAwait(false) as IInternalServiceHubContext;
23+
var hubContext = await _serviceManagerStore
24+
.GetOrAddByConnectionStringKey(input.ConnectionStringSetting)
25+
.GetAsync(input.HubName).ConfigureAwait(false) as IInternalServiceHubContext;
2426
return hubContext.GetServiceEndpoints().ToArray();
2527
}
2628
}

0 commit comments

Comments
 (0)